summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-07 02:05:53 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-07 02:05:53 +0200
commitae90406453eb894400a25e0557bb2c7bf19f06a4 (patch)
treebedaba40edce82382887efb0850c3732d3e91165 /CMakeLists.txt
parent8f12f0c3b2f50e5356c026f646bc5003369b3014 (diff)
downloadfastd-ae90406453eb894400a25e0557bb2c7bf19f06a4.tar
fastd-ae90406453eb894400a25e0557bb2c7bf19f06a4.zip
Define ethhdr when it is not available
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf0f5f7..942f5ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,14 @@ else()
set(LINUX FALSE)
endif()
+
+set(CMAKE_EXTRA_INCLUDE_FILES "netinet/if_ether.h")
+include(CheckTypeSize)
+
+check_type_size("struct ethhdr" SIZEOF_ETHHDR)
+string(COMPARE NOTEQUAL "${SIZEOF_ETHHDR}" "" HAVE_ETHHDR)
+
+
set(WITH_CAPABILITIES ${LINUX} CACHE BOOL "Include support for POSIX capabilities")
if(WITH_CAPABILITIES)