aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Beppu <beppu@lbox.org>2000-01-24 12:06:22 +0000
committerJohn Beppu <beppu@lbox.org>2000-01-24 12:06:22 +0000
commitbf3a838aaca4ab34d2739438fa44d0dbb04e9862 (patch)
tree6d7d69e7d69ae3dc43c4c48d2033c38c5681bbff
parent5509af7073ffff75d86ff8c67a2075169a859efd (diff)
downloadbusybox-w32-bf3a838aaca4ab34d2739438fa44d0dbb04e9862.tar.gz
busybox-w32-bf3a838aaca4ab34d2739438fa44d0dbb04e9862.tar.bz2
busybox-w32-bf3a838aaca4ab34d2739438fa44d0dbb04e9862.zip
put #if's around the lchown, because
older glibc versions don't have it.
-rw-r--r--chmod_chown_chgrp.c8
1 files changed, 7 insertions, 1 deletions
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)
55 switch (whichApp) { 55 switch (whichApp) {
56 case CHGRP_APP: 56 case CHGRP_APP:
57 case CHOWN_APP: 57 case CHOWN_APP:
58#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1)
58 if (lchown(fileName, (whichApp==CHOWN_APP)? uid : statbuf->st_uid, 59 if (lchown(fileName, (whichApp==CHOWN_APP)? uid : statbuf->st_uid,
59 (gid==-1)? statbuf->st_gid : gid) == 0) { 60 (gid==-1)? statbuf->st_gid : gid) == 0)
61#else
62 if (chown(fileName, (whichApp==CHOWN_APP)? uid : statbuf->st_uid,
63 (gid==-1)? statbuf->st_gid : gid) == 0)
64#endif
65 {
60 return( TRUE); 66 return( TRUE);
61 } 67 }
62 break; 68 break;