diff --git a/ext/sockets/config.m4 b/ext/sockets/config.m4 index d4f92082c3b2d..aafedcb99ddd3 100644 --- a/ext/sockets/config.m4 +++ b/ext/sockets/config.m4 @@ -67,6 +67,9 @@ if test "$PHP_SOCKETS" != "no"; then AC_CACHE_CHECK([if ancillary credentials uses ucred],[ac_cv_ucred], [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif #include ]], [[struct ucred u = {.gid = 0};]])], [ac_cv_ucred=yes], [ac_cv_ucred=no])