cmake: define _NETBSD_SOURCE for NetBSD

This commit is contained in:
scribam 2023-04-29 17:11:24 +02:00
parent 861298fa24
commit 836fba4684
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,9 @@ if (NOT WIN32)
# add_definitions (-D_POSIX_C_SOURCE=200112L)
target_compile_definitions(miniupnpc-private INTERFACE _XOPEN_SOURCE=600)
endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
target_compile_definitions(miniupnpc-private INTERFACE _NETBSD_SOURCE)
endif ()
else ()
target_compile_definitions(miniupnpc-private INTERFACE _WIN32_WINNT=0x0501) # XP or higher for getnameinfo and friends
endif ()