@@ -141,7 +141,6 @@ typedef u_int64_t xfs_ino_t;
typedef u_int32_t xfs_dev_t;
typedef int64_t xfs_daddr_t;
-#define pread64 pread
#define pwrite64 pwrite
#define fdatasync fsync
#define memalign(a,sz) valloc(sz)
@@ -35,7 +35,6 @@
/* FreeBSD file API is 64-bit aware */
#define pwrite64 pwrite
-#define pread64 pread
#define fdatasync fsync
#define memalign(a,sz) valloc(sz)
@@ -214,7 +214,7 @@ do_pread(
ssize_t buffer_size)
{
if (!vectors)
- return pread64(fd, buffer, min(count, buffer_size), offset);
+ return pread(fd, buffer, min(count, buffer_size), offset);
return do_preadv(fd, offset, count, buffer_size);
}
@@ -254,7 +254,7 @@ read_random(
if (bytes == 0)
break;
if (bytes < 0) {
- perror("pread64");
+ perror("pread");
return -1;
}
ops++;
@@ -296,7 +296,7 @@ read_backward(
if (bytes == 0)
return ops;
if (bytes < 0) {
- perror("pread64");
+ perror("pread");
return -1;
}
ops++;
@@ -314,7 +314,7 @@ read_backward(
if (bytes == 0)
break;
if (bytes < 0) {
- perror("pread64");
+ perror("pread");
return -1;
}
ops++;
@@ -345,7 +345,7 @@ read_forward(
if (bytes == 0)
break;
if (bytes < 0) {
- perror("pread64");
+ perror("pread");
return -1;
}
ops++;
@@ -915,7 +915,7 @@ __read_buf(int fd, void *buf, int len, off64_t offset, int flags)
{
int sts;
- sts = pread64(fd, buf, len, offset);
+ sts = pread(fd, buf, len, offset);
if (sts < 0) {
int error = errno;
fprintf(stderr, _("%s: read failed: %s\n"),
@@ -565,7 +565,7 @@ pf_batch_read(
/*
* now read the data and put into the xfs_but_t's
*/
- len = pread64(mp_fd, buf, (int)(last_off - first_off), first_off);
+ len = pread(mp_fd, buf, (int)(last_off - first_off), first_off);
/*
* Check the last buffer on the list to see if we need to
Signed-off-by: Felix Janda <felix.janda@posteo.de> --- include/darwin.h | 1 - include/freebsd.h | 1 - io/pread.c | 10 +++++----- libxfs/rdwr.c | 2 +- repair/prefetch.c | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-)