]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared: add a temporary work-around for kernel header inclusion fuck-up
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Apr 2016 17:30:31 +0000 (19:30 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 12 Apr 2016 11:43:31 +0000 (13:43 +0200)
See: #2864

src/shared/firewall-util.c

index 0d3da2e6d2e25db96540ac2f08c90fada3f6ed68..ade2de7727f10eb78bb9955f1035e93014d11fb8 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#warning "Temporary work-around for broken glibc vs. linux kernel header definitions"
+#warning "This really should be removed sooner rather than later, when this is fixed upstream"
+#define _NET_IF_H 1
+
 #include <alloca.h>
 #include <arpa/inet.h>
 #include <endian.h>
 #include <errno.h>
-#include <net/if.h>
 #include <stddef.h>
 #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>
+#endif
 #include <linux/netfilter_ipv4/ip_tables.h>
 #include <linux/netfilter/nf_nat.h>
 #include <linux/netfilter/xt_addrtype.h>