From 09532a12a6afb28e5a956547bce8b07572a26ba5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 12 Jun 2020 12:35:02 +0200 Subject: Suppress deprecation warning in sockets.c This one was quite a journey... --- ext/sockets/sockets.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index dd0023f46c..f200a2819c 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -99,6 +99,14 @@ static int le_socket; static int le_addrinfo; #define le_addrinfo_name php_sockets_le_addrinfo_name +/* The AI_IDN_ALLOW_UNASSIGNED deprecations are implemented as a pragma GCC warning, + * using _Pragma() for macro support. As this warning is thrown without a warning + * category, it's also not possible to suppress it, because it is not part of + * -Wdeprecated-declarations or similar. We work around this by defining + * __glibc_macro_warning() to be empty. */ +#undef __glibc_macro_warning +#define __glibc_macro_warning(message) + /* {{{ arginfo */ ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_select, 0, 0, 4) ZEND_ARG_INFO(1, read_fds) -- cgit v1.2.1