mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
r22127: Wrap the AC_TRY_RUN detection for Linux getgrouplist in an
AC_CACHE_CHECK, so it can be cross-compiled.
(This used to be commit f9fb07d2f9
)
This commit is contained in:
parent
d1103534ba
commit
8c34aab008
@ -1378,23 +1378,33 @@ AC_DEFINE(HAVE_PRCTL, 1, [Whether prctl is available]),[])
|
|||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
*linux*)
|
*linux*)
|
||||||
# glibc <= 2.3.2 has a broken getgrouplist
|
# glibc <= 2.3.2 has a broken getgrouplist
|
||||||
AC_TRY_RUN([
|
AC_CACHE_CHECK([for a broken Linux getgrouplist API],
|
||||||
|
linux_getgrouplist_ok,
|
||||||
|
[
|
||||||
|
AC_TRY_RUN([
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
main() {
|
|
||||||
/* glibc up to 2.3 has a broken getgrouplist */
|
|
||||||
#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
|
|
||||||
int libc_major = __GLIBC__;
|
|
||||||
int libc_minor = __GLIBC_MINOR__;
|
|
||||||
|
|
||||||
if (libc_major < 2)
|
main() {
|
||||||
exit(1);
|
/* glibc up to 2.3 has a broken getgrouplist */
|
||||||
if ((libc_major == 2) && (libc_minor <= 3))
|
#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
|
||||||
exit(1);
|
int libc_major = __GLIBC__;
|
||||||
|
int libc_minor = __GLIBC_MINOR__;
|
||||||
|
|
||||||
|
if (libc_major < 2)
|
||||||
|
exit(1);
|
||||||
|
if ((libc_major == 2) && (libc_minor <= 3))
|
||||||
|
exit(1);
|
||||||
#endif
|
#endif
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no])
|
|
||||||
|
],
|
||||||
|
[linux_getgrouplist_ok=yes],
|
||||||
|
[linux_getgrouplist_ok=no],
|
||||||
|
[linux_getgrouplist_ok=cross])
|
||||||
|
])
|
||||||
|
|
||||||
if test x"$linux_getgrouplist_ok" = x"yes"; then
|
if test x"$linux_getgrouplist_ok" = x"yes"; then
|
||||||
AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist])
|
AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist])
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user