Undefine the __unused macro around problematic places.
authormarta <marta@onelab7.(none)>
Fri, 21 Jan 2011 11:42:43 +0000 (12:42 +0100)
committermarta <marta@onelab7.(none)>
Fri, 21 Jan 2011 11:42:43 +0000 (12:42 +0100)
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 */