[PATCH] net: include <linux/if.h> instead of <net/if.h>
Adrien Schildknecht <[email protected]> Thu, 10 Mar 2016 15:31:49 -0800
| Newsgroups | org.kernel.vger.trinity |
|---|---|
| Message-ID | <[email protected]> |
Commit 4ada80dd202675 includes net/if.h and linux/netfilter_ipv4/ip_tables.h
net/* and linux/* should not be mixed.
Debian Jessie x86_64:
CC net/proto-ipv4.o
In file included from net/proto-ipv4.c:11:0:
/usr/include/linux/if.h:71:2: error: redeclaration of enumerator 'IFF_UP'
IFF_UP = 1<<0, /* sysfs */
/usr/include/net/if.h:44:5: note: previous definition of 'IFF_UP' was here
IFF_UP = 0x1, /* Interface is up. */
[...]
Signed-off-by: Adrien Schildknecht <[email protected]>
---
net/proto-ipv4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/proto-ipv4.c b/net/proto-ipv4.c
index dc9aa48..0be0263 100644
--- a/net/proto-ipv4.c
+++ b/net/proto-ipv4.c
@@ -8,7 +8,7 @@
#include <linux/types.h>
#include <arpa/inet.h>
#include <linux/mroute.h>
-#include <net/if.h>
+#include <linux/if.h>
#include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter_bridge/ebtables.h>
#include <linux/netfilter_arp/arp_tables.h>
--
2.7.2