Skip to content

Commit 09532a1

Browse files
committed
Suppress deprecation warning in sockets.c
This one was quite a journey...
1 parent 2fd278b commit 09532a1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/sockets/sockets.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ static int le_socket;
9999
static int le_addrinfo;
100100
#define le_addrinfo_name php_sockets_le_addrinfo_name
101101

102+
/* The AI_IDN_ALLOW_UNASSIGNED deprecations are implemented as a pragma GCC warning,
103+
* using _Pragma() for macro support. As this warning is thrown without a warning
104+
* category, it's also not possible to suppress it, because it is not part of
105+
* -Wdeprecated-declarations or similar. We work around this by defining
106+
* __glibc_macro_warning() to be empty. */
107+
#undef __glibc_macro_warning
108+
#define __glibc_macro_warning(message)
109+
102110
/* {{{ arginfo */
103111
ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_select, 0, 0, 4)
104112
ZEND_ARG_INFO(1, read_fds)

0 commit comments

Comments
 (0)