[network-manager-openswan] all: avoid including linux/in6.h



commit 36edb41130b47772bd95db03a685096715594d1f
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Thu Aug 27 10:56:46 2015 +0200

    all: avoid including linux/in6.h
    
    linux/xfrm.h in some versions drags it in and it pulls in definitions that
    conflict with netinet/inet.h. RHEL 7.2 kernel does this, older version don't,
    while later versions contain proper guards.

 src/nm-openswan-service-helper.c |    2 ++
 src/show-xfrm.c                  |    4 +++-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/nm-openswan-service-helper.c b/src/nm-openswan-service-helper.c
index ac4dfd7..c56298e 100644
--- a/src/nm-openswan-service-helper.c
+++ b/src/nm-openswan-service-helper.c
@@ -34,6 +34,8 @@
 
 #include <netlink/netlink.h>
 #include <netlink/msg.h>
+
+#define _LINUX_IN6_H 1
 #include <linux/xfrm.h>
 
 #include <dbus/dbus.h>
diff --git a/src/show-xfrm.c b/src/show-xfrm.c
index b305621..daa3b9c 100644
--- a/src/show-xfrm.c
+++ b/src/show-xfrm.c
@@ -20,10 +20,12 @@
 #define _GNU_SOURCE 1
 #include <netlink/netlink.h>
 #include <netlink/msg.h>
-#include <linux/xfrm.h>
 #include <sys/socket.h>
 #include <arpa/inet.h>
 
+#define _LINUX_IN6_H 1
+#include <linux/xfrm.h>
+
 #include <glib.h>
 
 static int


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]