]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Make the fix for net/if.h fuckup even worse (#3287)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 20 May 2016 13:12:42 +0000 (09:12 -0400)
committerLennart Poettering <lennart@poettering.net>
Fri, 20 May 2016 13:12:42 +0000 (15:12 +0200)
The original conflict is fixed in the kernel in v4.6-rc7-40-g4a91cb61bb,
but now our work-around causes a compilation failure.
Keep the workaround to support 4.5 kernels for now, and layer
more ugliness on top.

Tested with:
kernel-headers-4.6.0-1.fc25.x86_64
glibc-devel-2.23.90-18.fc25.x86_64

kernel-headers-4.5.4-300.fc24.x86_64
glibc-devel-2.23.1-7.fc24.x86_64

kernel-headers-4.4.9-300.fc23.x86_64
glibc-devel-2.22-16.fc23.x86_64

kernel-headers-4.1.13-100.fc21.x86_64
glibc-devel-2.20-8.fc21.x86_64

src/shared/firewall-util.c

index 97865eac4a35ed0db21f9c4c7f650d5ee4f0e849..f73108eaa32d3587b8088372f2eca73db6c6b3d1 100644 (file)
 #include <string.h>
 #include <sys/socket.h>
 #include <net/if.h>
-#include <linux/if.h>
 #ifndef IFNAMSIZ
-#undef _NET_IF_H
-/* Let's make sure to include this one, too, if IFNAMSIZ isn't defined yet, as it is for kernels <= 4.2 */
-#include <net/if.h>
+#define IFNAMSIZ 16
 #endif
+#include <linux/if.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
 #include <linux/netfilter/nf_nat.h>
 #include <linux/netfilter/xt_addrtype.h>