X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/1b2d733af23599b2cc173c8a275b895760f66258..59503278bfc27ad27c03dfaeab4e3de02198f81c:/util.c diff --git a/util.c b/util.c index f61e91da..f1665e3e 100644 --- a/util.c +++ b/util.c @@ -32,7 +32,7 @@ int num_waiting(int fd) } -struct map_struct *map_file(int fd,off_t len) +struct map_struct *map_file(int fd,OFF_T len) { struct map_struct *ret; ret = (struct map_struct *)malloc(sizeof(*ret)); @@ -54,7 +54,7 @@ struct map_struct *map_file(int fd,off_t len) } -char *map_ptr(struct map_struct *map,off_t offset,int len) +char *map_ptr(struct map_struct *map,OFF_T offset,int len) { int nread = -2; @@ -83,7 +83,7 @@ char *map_ptr(struct map_struct *map,off_t offset,int len) map->p_size = len; } - if (lseek(map->fd,offset,SEEK_SET) != offset || + if (do_lseek(map->fd,offset,SEEK_SET) != offset || (nread=read(map->fd,map->p,len)) != len) { fprintf(FERROR,"EOF in map_ptr! (offset=%d len=%d nread=%d errno=%d)\n", (int)offset, len, nread, errno);