From 6bd8c1db2fa84b414db73cfde842dfb31b039913 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Tue, 2 Nov 2021 17:17:32 +0100
Subject: CMakeLists.txt: fix macOS build
---
CMakeLists.txt | 2 ++
nncmpp.c | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f5db727..5e60a17 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,6 +58,8 @@ if ("${CMAKE_SYSTEM_NAME}" MATCHES "BSD")
# Need this for SIGWINCH in FreeBSD and OpenBSD respectively;
# our POSIX version macros make it undefined
add_definitions (-D__BSD_VISIBLE=1 -D_BSD_SOURCE=1)
+elseif (APPLE)
+ add_definitions (-D_DARWIN_C_SOURCE)
endif ()
include (CheckFunctionExists)
diff --git a/nncmpp.c b/nncmpp.c
index 2f47053..2ae493d 100644
--- a/nncmpp.c
+++ b/nncmpp.c
@@ -78,9 +78,7 @@ enum
#include