Skip to content

Commit 07aaa34

Browse files
devnexencmb69
authored andcommitted
Fix GH-7978: sockets extension compilation errors
We fix the `ucred` detection when custom `CFLAGS` are in use. Closes GH-7981.
1 parent 82b8830 commit 07aaa34

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ PHP NEWS
2222

2323
- Sockets:
2424
. Fixed ext/sockets build on Haiku. (David Carlier)
25+
. Fixed bug GH-7978 (sockets extension compilation errors). (David Carlier)
2526

2627
- Standard:
2728
. Fixed bug GH-7875 (mails are sent even if failure to log throws exception).

ext/sockets/config.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ if test "$PHP_SOCKETS" != "no"; then
6767
AC_CACHE_CHECK([if ancillary credentials uses ucred],[ac_cv_ucred],
6868
[
6969
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
70+
#ifndef _GNU_SOURCE
71+
#define _GNU_SOURCE
72+
#endif
7073
#include <sys/socket.h>
7174
]], [[struct ucred u = {.gid = 0};]])],
7275
[ac_cv_ucred=yes], [ac_cv_ucred=no])

0 commit comments

Comments
 (0)