From 72d3183e2dfac3bdc312b0cef2218e8a5c8b2901 Mon Sep 17 00:00:00 2001 From: mmyjona Date: Thu, 15 Sep 2022 04:51:57 -0700 Subject: [PATCH] fix netbsd build --- miniupnpc/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniupnpc/CMakeLists.txt b/miniupnpc/CMakeLists.txt index 007ac72..102094c 100644 --- a/miniupnpc/CMakeLists.txt +++ b/miniupnpc/CMakeLists.txt @@ -29,7 +29,7 @@ if (NOT WIN32) target_compile_definitions(miniupnpc-private INTERFACE MINIUPNPC_SET_SOCKET_TIMEOUT _BSD_SOURCE _DEFAULT_SOURCE) - if (NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS") + if (NOT APPLE AND NOT CMAKE_SYSTEM_NAME MATCHES ".*BSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS") # add_definitions (-D_POSIX_C_SOURCE=200112L) target_compile_definitions(miniupnpc-private INTERFACE _XOPEN_SOURCE=600) endif ()