summaryrefslogtreecommitdiffstats
path: root/patches/samba-3.0.37/0002-configure.in-make-getgrouplist_ok-test-cross-compile.patch
blob: 0043cee20f34148628296380e8fff7e39cd5bcad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 9130b57a196e2cf316230409b7e1d4a4eab56fed Mon Sep 17 00:00:00 2001
From: Robert Schwebel <r.schwebel@pengutronix.de>
Date: Tue, 7 Jul 2009 15:56:55 +0200
Subject: [PATCH 2/8] [configure.in] make getgrouplist_ok test cross compile save

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 source/configure.in |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/source/configure.in b/source/configure.in
index 1e4ea0f..192a9d9 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -1389,7 +1389,7 @@ AC_DEFINE(HAVE_PRCTL, 1, [Whether prctl is available]),[])
 case "$host_os" in
     *linux*)
        # glibc <= 2.3.2 has a broken getgrouplist
-       AC_TRY_RUN([
+       AC_RUN_IFELSE([
 #include <unistd.h>
 #include <sys/utsname.h>
 main() {
@@ -1405,10 +1405,14 @@ main() {
 #endif
        exit(0);
 }
-], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no])
+], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no], [linux_getgrouplist_ok=maybe])
+
        if test x"$linux_getgrouplist_ok" = x"yes"; then
           AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist])
        fi
+       if test x"$linux_getgrouplist_ok" = x"maybe"; then
+          AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist - guessed while crosscompiling])
+       fi
        ;;
     *)
        AC_CHECK_FUNCS(getgrouplist)
-- 
1.6.3.3