X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/bcacc18bdf1bdac625ef1f178e8e32892544cc30..59503278bfc27ad27c03dfaeab4e3de02198f81c:/syscall.c diff --git a/syscall.c b/syscall.c index 103c002f..96b42b6f 100644 --- a/syscall.c +++ b/syscall.c @@ -105,6 +105,7 @@ int do_stat(const char *fname, STRUCT_STAT *st) #endif } +#if SUPPORT_LINKS int do_lstat(const char *fname, STRUCT_STAT *st) { #if HAVE_OFF64_T @@ -113,6 +114,7 @@ int do_lstat(const char *fname, STRUCT_STAT *st) return lstat(fname, st); #endif } +#endif int do_fstat(int fd, STRUCT_STAT *st) { @@ -122,3 +124,21 @@ int do_fstat(int fd, STRUCT_STAT *st) return fstat(fd, st); #endif } + +OFF_T do_lseek(int fd, OFF_T offset, int whence) +{ +#if HAVE_OFF64_T + return lseek64(fd, offset, whence); +#else + return lseek(fd, offset, whence); +#endif +} + +char *d_name(struct dirent *di) +{ +#if HAVE_BROKEN_READDIR + return (di->d_name - 2); +#else + return di->d_name; +#endif +}