git://git.onelab.eu
/
ipfw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Undefine the __unused macro around problematic places.
[ipfw.git]
/
ipfw
/
ipfw2.c
diff --git
a/ipfw/ipfw2.c
b/ipfw/ipfw2.c
index
9e2dd59
..
6cb826b
100644
(file)
--- a/
ipfw/ipfw2.c
+++ b/
ipfw/ipfw2.c
@@
-40,7
+40,14
@@
#include <time.h> /* ctime */
#include <timeconv.h> /* _long_to_time */
#include <unistd.h>
#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>
#include <fcntl.h>
+#define __unused __attribute__ ((__unused__))
#include <net/ethernet.h>
#include <net/if.h> /* only IFNAMSIZ */
#include <net/ethernet.h>
#include <net/if.h> /* only IFNAMSIZ */