2
1

procps-mips-define-pagesize.patch 1.0 KB

1234567891011121314151617181920212223242526272829
  1. diff -Naurp procps-3.2.3.orig/minimal.c procps-3.2.3/minimal.c
  2. --- procps-3.2.3.orig/minimal.c 2004-05-04 20:26:14.000000000 -0400
  3. +++ procps-3.2.3/minimal.c 2004-08-20 02:01:35.868100752 -0400
  4. @@ -68,8 +68,8 @@
  5. ///////////////////////////////////////////////////////////
  6. #ifndef PAGE_SIZE
  7. -#warning PAGE_SIZE not defined, assuming it is 4096
  8. -#define PAGE_SIZE 4096
  9. +#warning PAGE_SIZE not defined, using sysconf() to determine correct value
  10. +#define PAGE_SIZE (sysconf(_SC_PAGESIZE))
  11. #endif
  12. diff -Naurp procps-3.2.3.orig/ps/common.h procps-3.2.3/ps/common.h
  13. --- procps-3.2.3.orig/ps/common.h 2004-04-25 17:03:18.000000000 -0400
  14. +++ procps-3.2.3/ps/common.h 2004-08-20 02:00:59.228670792 -0400
  15. @@ -16,6 +16,11 @@
  16. #include "../proc/readproc.h"
  17. #include <asm/page.h> /* looks safe for glibc, we need PAGE_SIZE */
  18. +#ifndef PAGE_SIZE
  19. +#warning PAGE_SIZE not defined, using sysconf() to determine correct value
  20. +#define PAGE_SIZE (sysconf(_SC_PAGESIZE))
  21. +#endif
  22. +
  23. #if 0
  24. #define trace(args...) printf(## args)
  25. #else