From: Jeremy Allison Date: Fri, 11 Dec 1998 00:24:23 +0000 (+0000) Subject: Fixed configure bug with RedHat 5.1 where it uses setresgid even though X-Git-Tag: samba-2.0.0beta4~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5df1a097cd4324965bd3e7a17d20b69109f0348e;p=thirdparty%2Fsamba.git Fixed configure bug with RedHat 5.1 where it uses setresgid even though this is not yet implemented. Jeremy. --- diff --git a/source/configure b/source/configure index 44d884bdc32..59809cd9ddb 100755 --- a/source/configure +++ b/source/configure @@ -3025,7 +3025,7 @@ else #include "confdefs.h" #include #include -main() { setresgid(1,1,1); exit(0);} +main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then diff --git a/source/configure.in b/source/configure.in index cf730e8f2bc..3554cddba57 100644 --- a/source/configure.in +++ b/source/configure.in @@ -190,7 +190,7 @@ fi AC_CACHE_CHECK([for real setresgid],samba_cv_have_setresgid,[ AC_TRY_RUN([#include #include -main() { setresgid(1,1,1); exit(0);}], +main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}], samba_cv_have_setresgid=yes,samba_cv_have_setresgid=no)]) if test x"$samba_cv_have_setresgid" = x"yes"; then AC_DEFINE(HAVE_SETRESGID)