diff options
author | Cy Schubert <cy@FreeBSD.org> | 2019-12-21 21:01:03 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2019-12-21 21:01:03 +0000 |
commit | 57e22627f9459b9dfd6043b32e02ecfcf205e176 (patch) | |
tree | 733d0d2f47b71256b6ed23db38f8d98f49e84a59 /contrib/libpcap/ftmacros.h | |
parent | d07c5718060de7337ab278cfd1b0f7f0616493c0 (diff) | |
parent | 30a580a870fabfea51e4b970c488e58bd1515ce4 (diff) | |
download | src-57e22627f9459b9dfd6043b32e02ecfcf205e176.tar.gz src-57e22627f9459b9dfd6043b32e02ecfcf205e176.zip |
Notes
Diffstat (limited to 'contrib/libpcap/ftmacros.h')
-rw-r--r-- | contrib/libpcap/ftmacros.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/contrib/libpcap/ftmacros.h b/contrib/libpcap/ftmacros.h index de8da98e38b6..cd3daebdf175 100644 --- a/contrib/libpcap/ftmacros.h +++ b/contrib/libpcap/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 |