summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2010-12-11 15:47:17 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2010-12-17 11:41:34 +0100
commit44fde57023e3463a1401c94e37585f5d66659277 (patch)
tree3db61bb1f64859891695c68147ed189b51955935
parenteadc7a04ea1fbb71987aeb8d1b7aaa6135cfbf5f (diff)
downloadlibmnl-44fde57023e3463a1401c94e37585f5d66659277.tar.gz
libmnl-44fde57023e3463a1401c94e37585f5d66659277.zip
header: use getpagesize() for MNL_SOCKET_BUFFER_SIZE
This system call returns PAGE_SIZE which depends on the architecture. See linux/netlink.h for more information on the appropriate datagram size for netlink. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--include/libmnl/libmnl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index 1237b6d..6ca6fd4 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -21,7 +21,7 @@ extern "C" {
*/
#define MNL_SOCKET_AUTOPID 0
-#define MNL_SOCKET_BUFFER_SIZE 8192UL /* see linux/netlink.h */
+#define MNL_SOCKET_BUFFER_SIZE getpagesize() < 8192UL ? getpagesize() : 8192UL
struct mnl_socket;