[PATCH] header: use sysconf() instead of getpagesize()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The sysconf(_SC_PAGESIZE) call is more portable since it does not need
_BSD_SOURCE defined.
---
 include/libmnl/libmnl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index 0de6678..3a589bc 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -17,7 +17,7 @@ extern "C" {
  */
 
 #define MNL_SOCKET_AUTOPID	0
-#define MNL_SOCKET_BUFFER_SIZE (getpagesize() < 8192L ? getpagesize() : 8192L)
+#define MNL_SOCKET_BUFFER_SIZE (sysconf(_SC_PAGESIZE) < 8192L ? sysconf(_SC_PAGESIZE) : 8192L)
 
 struct mnl_socket;
 
-- 
2.0.5

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux