From: Martin Willi Date: Fri, 11 Oct 2013 13:43:30 +0000 (+0200) Subject: tun-device: Rearrange headers to build properly when tun devices not supported X-Git-Tag: 5.2.0dr6~24^2~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43c5388470c66dc0948549af8e4f2d572e23b5f6;p=thirdparty%2Fstrongswan.git tun-device: Rearrange headers to build properly when tun devices not supported --- diff --git a/src/libstrongswan/networking/tun_device.c b/src/libstrongswan/networking/tun_device.c index f2c7b162f1..ff2c4a337e 100644 --- a/src/libstrongswan/networking/tun_device.c +++ b/src/libstrongswan/networking/tun_device.c @@ -16,24 +16,12 @@ * for more details. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if !defined(__APPLE__) && !defined(__linux__) && !defined(HAVE_NET_IF_TUN_H) - #include "tun_device.h" #include +#include -#warning TUN devices are not supported! +#if !defined(__APPLE__) && !defined(__linux__) && !defined(HAVE_NET_IF_TUN_H) tun_device_t *tun_device_create(const char *name_tmpl) { @@ -43,6 +31,17 @@ tun_device_t *tun_device_create(const char *name_tmpl) #else /* TUN devices supported */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #ifdef __APPLE__ #include #include @@ -58,11 +57,6 @@ tun_device_t *tun_device_create(const char *name_tmpl) #include #endif -#include "tun_device.h" - -#include -#include - #define TUN_DEFAULT_MTU 1500 typedef struct private_tun_device_t private_tun_device_t;