sysstat/sysstat-8.0.4-pagesize.diff
Vítězslav Čížek 0dc6490f39 Accepting request 344802 from home:pluskalm:branches:Base:System
- Update to 11.0.8
  * Fix possible NULL pointer dereference in SREALLOC macro (CID
    #29706).
  * sadc: Fix untrusted value used as argument (CID #29720).
  * Update librdsensors.a target in Makefile.
- Changes for 11.0.7
  * [Peter Schiffer]: Fix problem with pidstat output values > 100%
    for %CPU.
  * [Alexis Solanas]: Fix issue with iostat not showing the full
    device name.
  * CREDITS file updated.

OBS-URL: https://build.opensuse.org/request/show/344802
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysstat?expand=0&rev=65
2015-11-18 09:55:34 +00:00

16 lines
565 B
Diff

Index: common.h
===================================================================
--- common.h.orig
+++ common.h
@@ -146,8 +146,8 @@ extern unsigned int kb_shift;
* kB <-> number of pages.
* Page size depends on machine architecture (4 kB, 8 kB, 16 kB, 64 kB...)
*/
-#define KB_TO_PG(k) ((k) >> kb_shift)
-#define PG_TO_KB(k) ((k) << kb_shift)
+#define KB_TO_PG(k) ((k) / (getpagesize()/1024))
+#define PG_TO_KB(k) ((k) * (getpagesize()/1024))
/* Type of persistent device names used in sar and iostat */
extern char persistent_name_type[MAX_FILE_LEN];