diff options
author | Philip Paeps <philip@FreeBSD.org> | 2019-10-06 04:26:37 +0000 |
---|---|---|
committer | Philip Paeps <philip@FreeBSD.org> | 2019-10-06 04:26:37 +0000 |
commit | 30a580a870fabfea51e4b970c488e58bd1515ce4 (patch) | |
tree | cf18fcdc7c1818418ee5fc375ca4ba2094583a41 /ftmacros.h | |
parent | d109bf9e4b609b5a0626b433e56db4a47dc530bb (diff) |
Notes
Diffstat (limited to 'ftmacros.h')
-rw-r--r-- | ftmacros.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/ftmacros.h b/ftmacros.h index de8da98e38b6..cd3daebdf175 100644 --- a/ftmacros.h +++ b/ftmacros.h @@ -85,20 +85,14 @@ */ #elif defined(__linux__) || defined(linux) || defined(__linux) /* - * We can't turn _GNU_SOURCE on because some versions of GNU Libc - * will give the GNU version of strerror_r(), which returns a - * string pointer and doesn't necessarily fill in the buffer, - * rather than the standard version of strerror_r(), which - * returns 0 or an errno and always fills in the buffer. We - * require both of the latter behaviors. + * Turn on _GNU_SOURCE to get everything GNU libc has to offer, + * including asprintf(). * - * So we try turning everything else on that we can. This includes - * defining _XOPEN_SOURCE as 600, because we want to force crypt() - * to be declared on systems that use GNU libc, such as most Linux - * distributions. + * 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(). */ - #define _POSIX_C_SOURCE 200809L - #define _XOPEN_SOURCE 600 + #define _GNU_SOURCE /* * We turn on both _DEFAULT_SOURCE and _BSD_SOURCE to try to get |