aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-12-20 11:24:02 +0100
committerTobias Brunner <tobias@strongswan.org>2013-12-20 11:33:16 +0100
commitbfa2201537cb0a1c33ae38201accde8067902135 (patch)
tree13f5b45d378414d61530cdc6ab7cade7088b3fcd
parent7c4629060ab09435426f808cf1994ea64248c07a (diff)
downloadstrongswan-bfa2201537cb0a1c33ae38201accde8067902135.tar.bz2
strongswan-bfa2201537cb0a1c33ae38201accde8067902135.tar.xz
tun-device: Include system headers before our own
On CentOS 6.5 the sys/capability.h header file defines _LINUX_TYPES_H without actually including that header, preventing its later inclusion here. As library.h (via which the capabilities headers are included) is not actually required in tun_device.[ch], moving the inclusion of tun_device.h would not strictly be necessary. But it's probably a good idea to include our own headers after system headers anyway, for if one of the recursively included files at a later point includes library.h we'd have the same problem again.
-rw-r--r--src/libstrongswan/networking/tun_device.c7
-rw-r--r--src/libstrongswan/networking/tun_device.h1
2 files changed, 5 insertions, 3 deletions
diff --git a/src/libstrongswan/networking/tun_device.c b/src/libstrongswan/networking/tun_device.c
index ef296357e..ecefdc233 100644
--- a/src/libstrongswan/networking/tun_device.c
+++ b/src/libstrongswan/networking/tun_device.c
@@ -27,9 +27,11 @@
#include <unistd.h>
#include <net/if.h>
+#if !defined(__APPLE__) && !defined(__linux__) && !defined(HAVE_NET_IF_TUN_H)
+
#include "tun_device.h"
-#if !defined(__APPLE__) && !defined(__linux__) && !defined(HAVE_NET_IF_TUN_H)
+#include <utils/debug.h>
#warning TUN devices are not supported!
@@ -52,7 +54,8 @@ tun_device_t *tun_device_create(const char *name_tmpl)
#include <net/if_tun.h>
#endif
-#include <library.h>
+#include "tun_device.h"
+
#include <utils/debug.h>
#include <threading/thread.h>
diff --git a/src/libstrongswan/networking/tun_device.h b/src/libstrongswan/networking/tun_device.h
index 1d330f133..543125beb 100644
--- a/src/libstrongswan/networking/tun_device.h
+++ b/src/libstrongswan/networking/tun_device.h
@@ -23,7 +23,6 @@
#ifndef TUN_DEVICE_H_
#define TUN_DEVICE_H_
-#include <library.h>
#include <networking/host.h>
typedef struct tun_device_t tun_device_t;