~ chicken-core (chicken-5) 163872127c5882812c0b6bae30994184a9afba32
commit 163872127c5882812c0b6bae30994184a9afba32
Author: Peder Refsnes <peder.refsnes@gmail.com>
AuthorDate: Sat Oct 25 17:39:03 2014 +0200
Commit: Peter Bex <peter.bex@xs4all.nl>
CommitDate: Fri Oct 31 09:07:37 2014 +0100
Fix deprecation warning for _BSD_SOURCE
When compiling any egg with CHICKEN you get a deprecation warning:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
On linux, `man feature_test_macros` states that the _BSD_SOURCE macro is
deprecated in glibc 2.20.
As suggested in the warning defining _DEFAULT_SOURCE makes the warning
go away.
Signed-off-by: Evan Hanson <evhan@foldling.org>
Signed-off-by: Peter Bex <peter.bex@xs4all.nl>
diff --git a/chicken.h b/chicken.h
index fc40303b..0c29471f 100644
--- a/chicken.h
+++ b/chicken.h
@@ -56,6 +56,13 @@
# define _SVID_SOURCE
#endif
+/*
+ * glibc >= 2.20 synonym for _BSD_SOURCE & _SVID_SOURCE.
+ */
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
+#endif
+
/*
* N.B. This file MUST not rely upon "chicken-config.h"
*/
Trap