From: Guus Sliepen Date: Sun, 27 Jun 2021 13:31:49 +0000 (+0200) Subject: Don't compile support for Device=fd on platforms that do not support UNIX sockets. X-Git-Tag: release-1.1pre18~10 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=6061f6bf59cadce7f26164f7a8ec9923438d223c;p=tinc Don't compile support for Device=fd on platforms that do not support UNIX sockets. --- diff --git a/src/fd_device.c b/src/fd_device.c index 8ac51fa1..cfad5af8 100644 --- a/src/fd_device.c +++ b/src/fd_device.c @@ -20,6 +20,7 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifdef HAVE_SYS_UN_H #include #include "system.h" @@ -234,3 +235,4 @@ const devops_t fd_devops = { .read = read_packet, .write = write_packet, }; +#endif diff --git a/src/net_setup.c b/src/net_setup.c index 7b4c741f..1f0e74c1 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -1053,10 +1053,14 @@ static bool setup_myself(void) { devops = raw_socket_devops; } else if(!strcasecmp(type, "multicast")) { devops = multicast_devops; - } else if(!strcasecmp(type, "fd")) { + } + +#ifdef HAVE_SYS_UN_H + else if(!strcasecmp(type, "fd")) { devops = fd_devops; } +#endif #ifdef ENABLE_UML else if(!strcasecmp(type, "uml")) { devops = uml_devops;