]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Include <sys/socket.h> before checking for netlink
authorGuido Trotter <ultrotter@google.com>
Sun, 26 Jul 2009 15:44:12 +0000 (17:44 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Sun, 26 Jul 2009 15:44:12 +0000 (17:44 +0200)
With some versions of the compiler/headers linux/netlink.h won't compile
if sys/socket.h is defined before it.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Guido Trotter <ultrotter@quaqua.net>
configure.ac

index 93dc3273c1692ba3fd3ccb0fe90be6bf6b5cb5e7..f79e1f07b6df2eaa9007b6a04e3096688aefa1e9 100644 (file)
@@ -25,10 +25,11 @@ AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
 AS_AC_EXPAND(LXCPATH, "${localstatedir}/lib/lxc")
 AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
 
-AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
-[#include <linux/types.h>
-#include <bits/sockaddr.h>
-#include <linux/socket.h>])
+AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
+                 [],
+                 AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
+                 [#include <sys/socket.h>
+                ])
 
 AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
 [#include <sys/types.h>