aboutsummaryrefslogtreecommitdiff
path: root/src/configure.in
diff options
context:
space:
mode:
authorsashan <anedvedicky@gmail.com>2018-07-23 12:56:15 +0000
committerGreg Hudson <ghudson@mit.edu>2018-08-05 09:02:25 -0400
commit013de5c54eafebf5aa3fae82821c21ca2072040d (patch)
tree31703e01c9b54769ab33d94f8d95589e3530a540 /src/configure.in
parent49bb627fed70c5258c151c5135ac3d95ed1ee55d (diff)
downloadkrb5-013de5c54eafebf5aa3fae82821c21ca2072040d.zip
krb5-013de5c54eafebf5aa3fae82821c21ca2072040d.tar.gz
krb5-013de5c54eafebf5aa3fae82821c21ca2072040d.tar.bz2
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@mit.edu: rewrote commit message and comment] ticket: 8723 (new)
Diffstat (limited to 'src/configure.in')
-rw-r--r--src/configure.in5
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