diff options
author | Leonid Bobrov <mazocomp@disroot.org> | 2018-09-30 18:13:27 +0300 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-10-16 22:01:00 +0000 |
commit | ed9beef61c5713db6083a165f3c7d56d7f06186e (patch) | |
tree | a8191961a7917d9b264e7242933b8c9e04c5b1f6 | |
parent | 4dd86f1f29886772cf19d12acbd8cd7b35fb1d07 (diff) |
Support DragonFlyBSD and prune unused variables.
-rw-r--r-- | CMakeLists.txt | 12 | ||||
-rw-r--r-- | toxcore/LAN_discovery.c | 4 |
2 files changed, 2 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e7c0d79b..9db71402 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -61,18 +61,6 @@ if(APPLE) | |||
61 | include(MacRpath) | 61 | include(MacRpath) |
62 | endif() | 62 | endif() |
63 | 63 | ||
64 | if(UNIX) | ||
65 | if(CMAKE_SYSTEM_NAME MATCHES ".*Linux") | ||
66 | set(LINUX TRUE) | ||
67 | elseif(CMAKE_SYSTEM_NAME MATCHES "kOpenBSD.*|OpenBSD.*") | ||
68 | set(OPENBSD TRUE) | ||
69 | elseif(CMAKE_SYSTEM_NAME MATCHES "kNetBSD.*|NetBSD.*") | ||
70 | set(NETBSD TRUE) | ||
71 | elseif(CMAKE_SYSTEM_NAME MATCHES "kFreeBSD.*|FreeBSD") | ||
72 | set(FREEBSD TRUE) | ||
73 | endif() | ||
74 | endif() | ||
75 | |||
76 | enable_testing() | 64 | enable_testing() |
77 | 65 | ||
78 | set(CMAKE_MACOSX_RPATH ON) | 66 | set(CMAKE_MACOSX_RPATH ON) |
diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c index aeeea566..1137fc3d 100644 --- a/toxcore/LAN_discovery.c +++ b/toxcore/LAN_discovery.c | |||
@@ -119,7 +119,7 @@ static void fetch_broadcast_info(uint16_t port) | |||
119 | } | 119 | } |
120 | } | 120 | } |
121 | 121 | ||
122 | #elif defined(__linux__) || defined(__FreeBSD__) | 122 | #elif defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) |
123 | 123 | ||
124 | #include <netinet/in.h> | 124 | #include <netinet/in.h> |
125 | #include <sys/ioctl.h> | 125 | #include <sys/ioctl.h> |
@@ -131,7 +131,7 @@ static void fetch_broadcast_info(uint16_t port) | |||
131 | #include <linux/netdevice.h> | 131 | #include <linux/netdevice.h> |
132 | #endif | 132 | #endif |
133 | 133 | ||
134 | #ifdef __FreeBSD__ | 134 | #if defined(__FreeBSD__) || defined(__DragonFly__) |
135 | #include <net/if.h> | 135 | #include <net/if.h> |
136 | #endif | 136 | #endif |
137 | 137 | ||