linux-atm: Fix compile problem with kernel 4.20
[openwrt/staging/lynxis.git] / package / network / utils / linux-atm / patches / 510-remove-LINUX_NETDEVICE-hack.patch
1 This fixes the following compile problem with kernel 4.20:
2
3 In file included from arp.c:20:0:
4 include/linux/if_arp.h:121:16: error: 'IFNAMSIZ' undeclared here (not in a function)
5 char arp_dev[IFNAMSIZ];
6 ^~~~~~~~
7 make[7]: *** [Makefile:459: arp.o] Error 1
8
9 This is caused by commit 6a12709da354 ("net: if_arp: use define instead
10 of hard-coded value") in the upstream Linux kernel which is integrated
11 in Linux 4.20.
12
13 --- a/src/oamd/io.c
14 +++ b/src/oamd/io.c
15 @@ -20,7 +20,6 @@
16 #include <net/if.h>
17 #include <netinet/in.h>
18 #include <atm.h>
19 -#define _LINUX_NETDEVICE_H /* glibc2 */
20 #include <linux/types.h>
21 #include <linux/if_arp.h>
22
23 --- a/src/arpd/itf.c
24 +++ b/src/arpd/itf.c
25 @@ -12,7 +12,6 @@
26 #include <sys/types.h>
27 #include <linux/atmclip.h>
28 #include <sys/socket.h>
29 -#define _LINUX_NETDEVICE_H /* glibc2 */
30 #include <linux/types.h>
31 #include <linux/if_arp.h>
32
33 --- a/src/arpd/io.c
34 +++ b/src/arpd/io.c
35 @@ -21,7 +21,6 @@
36 #include <atm.h>
37 #include <linux/atmclip.h> /* for CLIP_DEFAULT_IDLETIMER */
38 #include <linux/atmarp.h>
39 -#define _LINUX_NETDEVICE_H /* glibc2 */
40 #include <linux/types.h>
41 #include <linux/if_arp.h>
42
43 --- a/src/arpd/arp.c
44 +++ b/src/arpd/arp.c
45 @@ -15,7 +15,6 @@
46 #include <sys/types.h>
47 #include <sys/socket.h> /* for linux/if_arp.h */
48 #include <netinet/in.h> /* for ntohs, etc. */
49 -#define _LINUX_NETDEVICE_H /* very crude hack for glibc2 */
50 #include <linux/types.h>
51 #include <linux/if_arp.h>
52 #include <linux/if_ether.h>