From fa959c0732fd39bf530936f69e44869856b51184 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 18 Apr 2017 11:06:13 +0200 Subject: [PATCH] tun-device: TUN devices are not supported on iOS --- src/libstrongswan/networking/tun_device.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/libstrongswan/networking/tun_device.c b/src/libstrongswan/networking/tun_device.c index de925553f0..ec6dac7ce7 100644 --- a/src/libstrongswan/networking/tun_device.c +++ b/src/libstrongswan/networking/tun_device.c @@ -21,7 +21,16 @@ #include #include -#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) { -- 2.47.2