Undefine the __unused macro around problematic places.
[ipfw.git] / ipfw / ipfw2.c
index 9e2dd59..6cb826b 100644 (file)
 #include <time.h>      /* ctime */
 #include <timeconv.h>  /* _long_to_time */
 #include <unistd.h>
+/*
+ * FreeBSD uses __unused as a shorthand for __attribute__ ((__unused__))
+ * whereas Linux sometimes uses __unused as a variable name.
+ * undefine the macro around problematic places.
+ */
+#undef __unused
 #include <fcntl.h>
+#define __unused       __attribute__ ((__unused__))
 
 #include <net/ethernet.h>
 #include <net/if.h>            /* only IFNAMSIZ */