Define _WANT_SEMUN for FreeBSD to ensure `union semun` is defined

Build was failing on GhostBSD (FreeBSD-13.0) because `union semun` is switched off by default. Defining _WANT_SEMUN switches it on.
This commit is contained in:
Noel O'Donnell 2019-07-26 03:00:42 +01:00
parent 8adde33e01
commit 757b789c30
1 changed files with 2 additions and 0 deletions

View File

@ -34,4 +34,6 @@ set(LMDB_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/liblmdb" CACHE STRING "LMDB Includ
set(LMDB_LIBRARY "lmdb" CACHE STRING "LMDB Library name")
if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
set_property(TARGET lmdb APPEND_STRING PROPERTY COMPILE_FLAGS " -D_SEM_SEMUN_UNDEFINED")
elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
set_property(TARGET lmdb APPEND_STRING PROPERTY COMPILE_FLAGS " -D_WANT_SEMUN")
endif()