From 44fde57023e3463a1401c94e37585f5d66659277 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 11 Dec 2010 15:47:17 +0100 Subject: 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 --- include/libmnl/libmnl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/libmnl/libmnl.h') 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; -- cgit v1.2.3