From: drgler Date: Thu, 1 Oct 2020 19:20:33 +0000 (+0200) Subject: Ensure that _GNU_SOURCE is defined for NI_MAXHOST and NI_MAXSERV X-Git-Tag: openssl-3.0.0-alpha7~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=99501e817cbc4f11cc045dbaa7a81854d4349335;p=thirdparty%2Fopenssl.git Ensure that _GNU_SOURCE is defined for NI_MAXHOST and NI_MAXSERV Since glibc 2.8, these defines like `NI_MAXHOST` are exposed only if suitable feature test macros are defined, namely: _GNU_SOURCE, _DEFAULT_SOURCE (since glibc 2.19), or _BSD_SOURCE or _SVID_SOURCE (before glibc 2.19), see GETNAMEINFO(3). CLA: trivial Fixes #13049 Reviewed-by: Richard Levitte Reviewed-by: Matt Caswell Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/13054) --- diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c index 46520031492..b7469bc7202 100644 --- a/crypto/bio/b_addr.c +++ b/crypto/bio/b_addr.c @@ -7,6 +7,10 @@ * https://www.openssl.org/source/license.html */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif + #include #include