summaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>1999-12-17 18:44:15 +0000
committerErik Andersen <andersen@codepoet.org>1999-12-17 18:44:15 +0000
commit4d1d0113fd3309aac30b2dd1d443bf7c7d5f0a3d (patch)
tree1d18bbba8f8a1d78d7ff13e7a87ee2aab165125f /utility.c
parent6da0ae8183a31d4faab745d534a363c7e66ef864 (diff)
downloadbusybox-w32-4d1d0113fd3309aac30b2dd1d443bf7c7d5f0a3d.tar.gz
busybox-w32-4d1d0113fd3309aac30b2dd1d443bf7c7d5f0a3d.tar.bz2
busybox-w32-4d1d0113fd3309aac30b2dd1d443bf7c7d5f0a3d.zip
Reworked the source so it will compile and run under glibc 2.0.7
and linux kernel 2.0.36 (though the dubious reasons why someone would want to do that defy imagination ;) -Erik
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/utility.c b/utility.c
index 74df632b9..e5c177ad5 100644
--- a/utility.c
+++ b/utility.c
@@ -217,10 +217,12 @@ copyFile( const char *srcName, const char *destName,
217 if (setModes == TRUE) { 217 if (setModes == TRUE) {
218 //fprintf(stderr, "Setting permissions for %s\n", destName); 218 //fprintf(stderr, "Setting permissions for %s\n", destName);
219 chmod(destName, srcStatBuf.st_mode); 219 chmod(destName, srcStatBuf.st_mode);
220 if (followLinks == TRUE) 220#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1)
221 chown(destName, srcStatBuf.st_uid, srcStatBuf.st_gid); 221 if (followLinks == FALSE)
222 else
223 lchown(destName, srcStatBuf.st_uid, srcStatBuf.st_gid); 222 lchown(destName, srcStatBuf.st_uid, srcStatBuf.st_gid);
223 else
224#endif
225 chown(destName, srcStatBuf.st_uid, srcStatBuf.st_gid);
224 226
225 times.actime = srcStatBuf.st_atime; 227 times.actime = srcStatBuf.st_atime;
226 times.modtime = srcStatBuf.st_mtime; 228 times.modtime = srcStatBuf.st_mtime;