From: John Beppu Date: Mon, 24 Jan 2000 12:06:22 +0000 (-0000) Subject: put #if's around the lchown, because X-Git-Tag: 0_42~29 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bf3a838aaca4ab34d2739438fa44d0dbb04e9862;p=oweals%2Fbusybox.git put #if's around the lchown, because older glibc versions don't have it. --- diff --git a/chmod_chown_chgrp.c b/chmod_chown_chgrp.c index 75db904e8..fb5cb921b 100644 --- a/chmod_chown_chgrp.c +++ b/chmod_chown_chgrp.c @@ -55,8 +55,14 @@ static int fileAction(const char *fileName, struct stat* statbuf) switch (whichApp) { case CHGRP_APP: case CHOWN_APP: +#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) if (lchown(fileName, (whichApp==CHOWN_APP)? uid : statbuf->st_uid, - (gid==-1)? statbuf->st_gid : gid) == 0) { + (gid==-1)? statbuf->st_gid : gid) == 0) +#else + if (chown(fileName, (whichApp==CHOWN_APP)? uid : statbuf->st_uid, + (gid==-1)? statbuf->st_gid : gid) == 0) +#endif + { return( TRUE); } break;