sysstat/sysstat-8.0.4-pagesize.diff
Tomáš Chvátal 5afe271817 Accepting request 538306 from home:pluskalm:branches:Base:System
- Update to version 11.6.1
  * See provided CHANGES for detailed list of changes
- Refresh patches:
  * sysstat-8.0.4-pagesize.diff
  * sysstat-8.0.4-sysconfdir.diff
  * sysstat-8.1.6-sa1sa2lock.diff
- Drop no longer needed
  * sysstat-8.0.4-sysconfdir.diff

OBS-URL: https://build.opensuse.org/request/show/538306
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysstat?expand=0&rev=73
2017-11-02 09:54:07 +00:00

16 lines
610 B
Diff

Index: sysstat-11.6.1/common.h
===================================================================
--- sysstat-11.6.1.orig/common.h
+++ sysstat-11.6.1/common.h
@@ -178,8 +178,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];