On 2012-06-29 21:43, Toralf F�rster wrote:
The current svn tree produces here at a Gentoo Linux a compilation error :
In file included from /usr/include/libnl3/netlink/route/link.h:18:0,
from iface_monitor.c:44:
/usr/include/linux/if.h:136:8: error: redefinition of �struct ifmap�
/usr/include/net/if.h:112:8: note: originally defined here
/usr/include/linux/if.h:170:8: error: redefinition of �struct ifreq�
/usr/include/net/if.h:127:8: note: originally defined here
/usr/include/linux/if.h:219:8: error: redefinition of �struct ifconf�
/usr/include/net/if.h:177:8: note: originally defined here
Hi,
This should hopefully fix your problem. net/if.h collides with
linux/if.h (included by libnl3)
diff --git a/iface_monitor.c b/iface_monitor.c
index 71c72e1..76db493 100644
--- a/iface_monitor.c
+++ b/iface_monitor.c
@@ -37,7 +37,9 @@
#include <strings.h>
#include <errno.h>
+#if defined(HAVE_LIBNL1) || defined(HAVE_LIBNL2)
#include <net/if.h>
+#endif
#include <netlink/msg.h>
#include <netlink/attr.h>