patch-agent_common_h 930 B

123456789101112131415161718192021222324252627282930313233343536
  1. $OpenBSD: patch-agent_common_h,v 1.2 2016/09/11 20:54:12 ajacoutot Exp $
  2. --- agent/common.h.orig Fri Feb 12 10:49:13 2016
  3. +++ agent/common.h Sun Sep 11 10:41:18 2016
  4. @@ -12,9 +12,18 @@
  5. #include "catalog/pg_control.h"
  6. -#ifndef WIN32
  7. +#if !defined(WIN32)
  8. +#if defined(__OpenBSD__)
  9. +#include <sys/select.h> /* timespec */
  10. +#include <sys/sched.h>
  11. +#include <sys/resource.h>
  12. +#include <sys/sysctl.h>
  13. +#include <paths.h>
  14. +#include <kvm.h>
  15. +#else
  16. #include "linux/version.h"
  17. #endif
  18. +#endif
  19. #define LINUX_VERSION_AT_LEAST(major, minor, patch) \
  20. (LINUX_VERSION_CODE >= KERNEL_VERSION(major, minor, patch))
  21. @@ -22,9 +31,11 @@
  22. #define GLIBC_VERSION_AT_LEAST(major, minor) \
  23. (__GLIBC__ > major || (__GLIBC__ == major && __GLIBC_MINOR__ >= minor))
  24. +#if defined(__linux__)
  25. #ifndef HAVE_SYNC_FILE_RANGE
  26. #if (LINUX_VERSION_AT_LEAST(2,6,17) && GLIBC_VERSION_AT_LEAST(2,6))
  27. #define HAVE_SYNC_FILE_RANGE
  28. +#endif
  29. #endif
  30. #endif