summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-07 03:21:54 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-07 03:23:32 +0200
commit78e1baac0654aad82b855f8ded90c1f35c81a552 (patch)
treec496fb2da1a38c09e39f4842cc616364a96cc116 /CMakeLists.txt
parent5ca89b31210b249f79a1a5cd1a258c85fdb7970e (diff)
downloadfastd-78e1baac0654aad82b855f8ded90c1f35c81a552.tar
fastd-78e1baac0654aad82b855f8ded90c1f35c81a552.zip
Implement get_current_dir_name() for *BSD systems
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d66ada..c9c76d5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,12 +26,17 @@ else()
endif()
-set(CMAKE_EXTRA_INCLUDE_FILES "netinet/if_ether.h")
+include(CheckPrototypeDefinition)
include(CheckTypeSize)
+set(CMAKE_EXTRA_INCLUDE_FILES "netinet/if_ether.h")
+set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE")
+
+check_prototype_definition("get_current_dir_name" "char *get_current_dir_name(void)" "NULL" "unistd.h" HAVE_GET_CURRENT_DIR_NAME)
check_type_size("struct ethhdr" SIZEOF_ETHHDR)
string(COMPARE NOTEQUAL "${SIZEOF_ETHHDR}" "" HAVE_ETHHDR)
+
set(USE_BINDTODEVICE ${LINUX})
set(USE_PMTU ${LINUX})
set(USE_PKTINFO ${LINUX})