diff options
author | Erik Andersen | 1999-12-17 18:44:15 +0000 |
---|---|---|
committer | Erik Andersen | 1999-12-17 18:44:15 +0000 |
commit | 4d1d0113fd3309aac30b2dd1d443bf7c7d5f0a3d (patch) | |
tree | 1d18bbba8f8a1d78d7ff13e7a87ee2aab165125f /utility.c | |
parent | 6da0ae8183a31d4faab745d534a363c7e66ef864 (diff) | |
download | busybox-4d1d0113fd3309aac30b2dd1d443bf7c7d5f0a3d.zip busybox-4d1d0113fd3309aac30b2dd1d443bf7c7d5f0a3d.tar.gz |
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.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -217,10 +217,12 @@ copyFile( const char *srcName, const char *destName, if (setModes == TRUE) { //fprintf(stderr, "Setting permissions for %s\n", destName); chmod(destName, srcStatBuf.st_mode); - if (followLinks == TRUE) - chown(destName, srcStatBuf.st_uid, srcStatBuf.st_gid); - else +#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) + if (followLinks == FALSE) lchown(destName, srcStatBuf.st_uid, srcStatBuf.st_gid); + else +#endif + chown(destName, srcStatBuf.st_uid, srcStatBuf.st_gid); times.actime = srcStatBuf.st_atime; times.modtime = srcStatBuf.st_mtime; |