]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
tun-device: TUN devices are not supported on iOS
authorTobias Brunner <tobias@strongswan.org>
Tue, 18 Apr 2017 09:06:13 +0000 (11:06 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 19 May 2017 13:22:51 +0000 (15:22 +0200)
src/libstrongswan/networking/tun_device.c

index de925553f0d2d3d398132c3548f8669625dff71c..ec6dac7ce750f0ee6faadbfba40b659ed5905cb3 100644 (file)
 #include <utils/debug.h>
 #include <threading/thread.h>
 
-#if !defined(__APPLE__) && !defined(__linux__) && !defined(HAVE_NET_IF_TUN_H)
+#if defined(__APPLE__)
+#include "TargetConditionals.h"
+#if !TARGET_OS_OSX
+#define TUN_DEVICE_NOT_SUPPORTED
+#endif
+#elif !defined(__linux__) && !defined(HAVE_NET_IF_TUN_H)
+#define TUN_DEVICE_NOT_SUPPORTED
+#endif
+
+#ifdef TUN_DEVICE_NOT_SUPPORTED
 
 tun_device_t *tun_device_create(const char *name_tmpl)
 {