fix indentation in one place
[metze/wireshark/wip.git] / iface_monitor.c
index 57925010e6d1df88fc5604ad63201967a9f62a4d..e9143f2dd2ba3c013b59fd76cb38a7f581af0767 100644 (file)
 #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>
 #include <netlink/route/link.h>
 
+#ifndef IFF_UP
+/*
+ * Apparently, some versions of libnl drag in headers that define IFF_UP
+ * and others don't.  Include <net/if.h> iff IFF_UP isn't already defined,
+ * so that if <linux/if.h> has been included by some or all of the
+ * netlink headers, we don't include <net/if.h> and get a bunch of
+ * complaints about various structures being redefined.
+ */
+#include <net/if.h>
+#endif
+
 /* libnl 1.x compatibility code */
 #ifdef HAVE_LIBNL1
 #define nl_sock nl_handle