~ chicken-core (chicken-5) 883431cab63dd357e8f70e745d9ed45f4045d9b1
commit 883431cab63dd357e8f70e745d9ed45f4045d9b1
Author: Peter Bex <peter@more-magic.net>
AuthorDate: Sun Apr 9 13:49:26 2017 +0200
Commit: Evan Hanson <evhan@foldling.org>
CommitDate: Mon Apr 10 11:48:48 2017 +1200
Add feature macro for NetBSD
NetBSD does not expose all of its own stuff with _BSD_SOURCE. For
that, you also need _NETBSD_SOURCE.
Without this, "NSIG" (and probably other things too) is undefined,
because it's declared conditionally in sys/signal.h on _NETBSD_SOURCE.
Signed-off-by: Evan Hanson <evhan@foldling.org>
diff --git a/NEWS b/NEWS
index ff3e8cd1..df1af55b 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,9 @@
- Unit "posix": If file-lock, file-lock/blocking or file-unlock are
interrupted by a signal, we now retry (thanks to Joerg Wittenberger).
+- Build system
+ - Fixed broken compilation on NetBSD, due to missing _NETBSD_SOURCE.
+
4.12.0
diff --git a/chicken.h b/chicken.h
index 13e69475..4ecb52cc 100644
--- a/chicken.h
+++ b/chicken.h
@@ -65,6 +65,10 @@
# define _BSD_SOURCE
# endif
+# ifndef _NETBSD_SOURCE
+# define _NETBSD_SOURCE
+# endif
+
# ifndef _SVID_SOURCE
# define _SVID_SOURCE
# endif
Trap