Skip to content

Add _GNU_SOURCE definition unconditionally #14651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,10 @@ else
AC_MSG_RESULT(no)
fi

dnl The effect of _GNU_SOURCE defined in config.h depeds on includes order
if test "$ac_cv_safe_to_define___extensions__" = yes ; then
AC_MSG_CHECKING(whether to use -D_GNU_SOURCE cflag)
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
AC_MSG_RESULT(yes)
fi
dnl Add _GNU_SOURCE compile definition because the php_config.h with definitions
dnl by AC_USE_SYSTEM_EXTENSIONS might be included after the system headers which
dnl require extensions to C and POSIX.
AS_VAR_APPEND([CPPFLAGS], [" -D_GNU_SOURCE"])

dnl Include Zend configurations.
dnl ----------------------------------------------------------------------------
Expand Down
Loading