krb5 commit: Use PTHREAD_CFLAGS when testing for getpwnam_r()
Greg Hudson
ghudson at mit.edu
Sun Aug 5 09:47:12 EDT 2018
https://github.com/krb5/krb5/commit/013de5c54eafebf5aa3fae82821c21ca2072040d
commit 013de5c54eafebf5aa3fae82821c21ca2072040d
Author: sashan <anedvedicky at gmail.com>
Date: Mon Jul 23 12:56:15 2018 +0000
Use PTHREAD_CFLAGS when testing for getpwnam_r()
On Solaris, AX_PTHREAD can include -D_POSIX_PTHREAD_SEMANTICS in
PTHREAD_CFLAGS, which affects which variants of getpwnam_r() and
getpwuid_r() are declared by system headers. In configure.in, use
PTHREAD_CFLAGS when testing for those functions to make sure that the
tests see the same variants as the build will.
[ghudson at mit.edu: rewrote commit message and comment]
ticket: 8723 (new)
src/configure.in | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/configure.in b/src/configure.in
index bafacf8..cfa26eb 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -576,6 +576,10 @@ fi
])
+# PTHREAD_CFLAGS changes which variant of these functions is declared
+# on Solaris 11, so use it for these tests.
+old_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
AC_CHECK_FUNC(getpwnam_r,ac_cv_func_getpwnam_r=yes,ac_cv_func_getpwnam_r=no)
AC_CHECK_FUNC(getpwuid_r,ac_cv_func_getpwuid_r=yes,ac_cv_func_getpwuid_r=no)
if test "$ac_cv_func_getpwnam_r" = yes; then
@@ -625,6 +629,7 @@ if test "$ac_cv_func_getpwnam_r" = yes; then
fi
fi
fi
+CFLAGS=$old_CFLAGS
if test "$ac_cv_func_getpwnam_r" = no && test "$ac_cv_func_getpwuid_r" = yes; then
# Actually, we could do this check, and the corresponding checks
More information about the cvs-krb5
mailing list