Skip to content

Commit

Permalink
Fix GH-7978: sockets extension compilation errors
Browse files Browse the repository at this point in the history
We fix the `ucred` detection when custom `CFLAGS` are in use.

Closes GH-7981.
  • Loading branch information
devnexen authored and cmb69 committed Jan 21, 2022
1 parent 82b8830 commit 07aaa34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ PHP NEWS

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

- Standard:
. Fixed bug GH-7875 (mails are sent even if failure to log throws exception).
Expand Down
3 changes: 3 additions & 0 deletions ext/sockets/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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 <sys/socket.h>
]], [[struct ucred u = {.gid = 0};]])],
[ac_cv_ucred=yes], [ac_cv_ucred=no])
Expand Down

0 comments on commit 07aaa34

Please sign in to comment.