Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tweaked the msg_list code so that the head and tail pointers
[rsync/rsync.git]
/
syscall.c
diff --git
a/syscall.c
b/syscall.c
index
2607774
..
117b10a
100644
(file)
--- a/
syscall.c
+++ b/
syscall.c
@@
-104,7
+104,11
@@
int do_mknod(char *pathname, mode_t mode, dev_t dev)
|| (bind(sock, (struct sockaddr*)&saddr, sizeof saddr)) < 0)
return -1;
close(sock);
|| (bind(sock, (struct sockaddr*)&saddr, sizeof saddr)) < 0)
return -1;
close(sock);
+#ifdef HAVE_CHMOD
return do_chmod(pathname, mode);
return do_chmod(pathname, mode);
+#else
+ return 0;
+#endif
}
#endif
#ifdef HAVE_MKNOD
}
#endif
#ifdef HAVE_MKNOD
@@
-137,7
+141,14
@@
int do_chmod(const char *path, mode_t mode)
int code;
if (dry_run) return 0;
RETURN_ERROR_IF_RO_OR_LO;
int code;
if (dry_run) return 0;
RETURN_ERROR_IF_RO_OR_LO;
- code = chmod(path, mode);
+ if (S_ISLNK(mode)) {
+#ifdef HAVE_LCHMOD
+ code = lchmod(path, mode & CHMOD_BITS);
+#else
+ code = 1;
+#endif
+ } else
+ code = chmod(path, mode & CHMOD_BITS);
if (code != 0 && preserve_perms)
return code;
return 0;
if (code != 0 && preserve_perms)
return code;
return 0;
@@
-243,8
+254,12
@@
int do_fstat(int fd, STRUCT_STAT *st)
OFF_T do_lseek(int fd, OFF_T offset, int whence)
{
OFF_T do_lseek(int fd, OFF_T offset, int whence)
{
-#ifdef SIZEOF_OFF64_T
+#ifdef HAVE_LSEEK64
+#if !SIZEOF_OFF64_T
+ OFF_T lseek64();
+#else
off64_t lseek64();
off64_t lseek64();
+#endif
return lseek64(fd, offset, whence);
#else
return lseek(fd, offset, whence);
return lseek64(fd, offset, whence);
#else
return lseek(fd, offset, whence);