icmp.c: do not include linux headers
net/if.h and linux/if.h headers conflict with each other as of linux
6.3 and glibc 2.37 headers:
In file included from /usr/include/linux/icmp.h:23,
from icmp.c:5:
/usr/include/net/if.h:44:5: error: redeclaration of enumerator ‘IFF_UP’
44 | IFF_UP = 0x1, /* Interface is up. */
| ^~~~~~
/usr/include/linux/if.h:83:9: note: previous definition of ‘IFF_UP’ with type ‘enum net_device_flags’
83 | IFF_UP = 1<<0, /* sysfs */
| ^~~~~~
icmp.c gets net/if.h from l2tpns.h, and linux/if.h from linux/icmp.h.
In our case, we do not need to use the linux headers at all here as we
are doing normal userspace things: just use glibc headers all the way.
This has been tested with kernel 3.2 / glibc 2.13 headers, so it's
probably fine. (l2tpns does not currently build with musl)
This commit is contained in:
parent
b46c2aa671
commit
e168cc6ff7
1 changed files with 2 additions and 2 deletions
4
icmp.c
4
icmp.c
|
|
@ -1,8 +1,8 @@
|
|||
// L2TPNS: icmp
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <linux/ip.h>
|
||||
#include <linux/icmp.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/ip_icmp.h>
|
||||
#include <netinet/icmp6.h>
|
||||
#include <unistd.h>
|
||||
#include <netinet/ip6.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue