diff options
author | Guy Harris <guy@alum.mit.edu> | 2020-04-25 16:17:13 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2020-04-25 16:17:13 -0700 |
commit | 20348670d5f3f8746d85a9892aa312e7591da4de (patch) | |
tree | 5a512caa88e975d109f9bf4223586f1a6e7b63d6 /ftmacros.h | |
parent | 19a145fe85a4d913fe7ac1780e73cf0610b8e5e9 (diff) |
Define _GNU_SOURCE on most platforms.
Don't assume only Linux and Cygwin are using GNU libc; GNU/HURD and
Debian's kFreeBSD do.
Diffstat (limited to 'ftmacros.h')
-rw-r--r-- | ftmacros.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -83,14 +83,18 @@ * least with HP's C compiler; hopefully doing so won't make it * *not* work with *un*-threaded code. */ -#elif defined(__linux__) || defined(linux) || defined(__linux) || defined(__CYGWIN__) +#else /* * Turn on _GNU_SOURCE to get everything GNU libc has to offer, - * including asprintf(). + * including asprintf(), if we're using GNU libc. * * Unfortunately, one thing it has to offer is a strerror_r() * that's not POSIX-compliant, but we deal with that in * pcap_fmt_errmsg_for_errno(). + * + * We don't limit this to, for example, Linux and Cygwin, because + * this might, for example, be GNU/HURD or one of Debian's kFreeBSD + * OSes ("GNU/FreeBSD"). */ #define _GNU_SOURCE |