aboutsummaryrefslogtreecommitdiff
path: root/ftmacros.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-11-27 21:21:11 -0800
committerGuy Harris <guy@alum.mit.edu>2017-11-27 21:21:11 -0800
commitdf32614f047426838994c16196816aa2a2db4d13 (patch)
tree31b0da2c57bffd903731787acd7df67d3f1ac9ae /ftmacros.h
parent8a2938e3f128ebcece251889c3e8da09fe139ddb (diff)
Define _DEFAULT_SOURCE *and* _BSD_SOURCE.
You are in a twisty little maze of Linux distributions and GNU libc releases, all different.
Diffstat (limited to 'ftmacros.h')
-rw-r--r--ftmacros.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ftmacros.h b/ftmacros.h
index 4b272d5f..de8da98e 100644
--- a/ftmacros.h
+++ b/ftmacros.h
@@ -99,6 +99,16 @@
*/
#define _POSIX_C_SOURCE 200809L
#define _XOPEN_SOURCE 600
+
+ /*
+ * We turn on both _DEFAULT_SOURCE and _BSD_SOURCE to try to get
+ * the BSD u_XXX types, such as u_int and u_short, defined. We
+ * define _DEFAULT_SOURCE first, so that newer versions of GNU libc
+ * don't whine about _BSD_SOURCE being deprecated; we still have
+ * to define _BSD_SOURCE to handle older versions of GNU libc that
+ * don't support _DEFAULT_SOURCE.
+ */
+ #define _DEFAULT_SOURCE
#define _BSD_SOURCE
#endif