Support DragonFlyBSD and prune unused variables.

This commit is contained in:
Leonid Bobrov 2018-09-30 18:13:27 +03:00 committed by iphydf
parent 4dd86f1f29
commit ed9beef61c
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
2 changed files with 2 additions and 14 deletions

View File

@ -61,18 +61,6 @@ if(APPLE)
include(MacRpath)
endif()
if(UNIX)
if(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
set(LINUX TRUE)
elseif(CMAKE_SYSTEM_NAME MATCHES "kOpenBSD.*|OpenBSD.*")
set(OPENBSD TRUE)
elseif(CMAKE_SYSTEM_NAME MATCHES "kNetBSD.*|NetBSD.*")
set(NETBSD TRUE)
elseif(CMAKE_SYSTEM_NAME MATCHES "kFreeBSD.*|FreeBSD")
set(FREEBSD TRUE)
endif()
endif()
enable_testing()
set(CMAKE_MACOSX_RPATH ON)

View File

@ -119,7 +119,7 @@ static void fetch_broadcast_info(uint16_t port)
}
}
#elif defined(__linux__) || defined(__FreeBSD__)
#elif defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
#include <netinet/in.h>
#include <sys/ioctl.h>
@ -131,7 +131,7 @@ static void fetch_broadcast_info(uint16_t port)
#include <linux/netdevice.h>
#endif
#ifdef __FreeBSD__
#if defined(__FreeBSD__) || defined(__DragonFly__)
#include <net/if.h>
#endif