diff --git a/dasdview/dasdview.c b/dasdview/dasdview.c index 94bfe599..0060a761 100644 --- a/dasdview/dasdview.c +++ b/dasdview/dasdview.c @@ -7,7 +7,6 @@ * it under the terms of the MIT license. See LICENSE for details. */ -#define _LARGEFILE64_SOURCE /* needed for unistd.h */ #define _FILE_OFFSET_BITS 64 /* needed for unistd.h */ #include @@ -1887,7 +1886,7 @@ static void dasdview_view_standard(dasdview_info_t *info) /* seek in SEEK_STEP steps */ for (i = 1; i <= j; i++) { - rc = lseek64(fd, SEEK_STEP, SEEK_CUR); + rc = lseek(fd, SEEK_STEP, SEEK_CUR); if (rc == -1) { printf("*** rc: %d (%d) ***\n", rc, errno); printf("*** j: %llu ***\n", j); diff --git a/zipl/src/zipl-editenv.c b/zipl/src/zipl-editenv.c index 05b59a6f..58c4da6a 100644 --- a/zipl/src/zipl-editenv.c +++ b/zipl/src/zipl-editenv.c @@ -128,7 +128,7 @@ static int envblk_update(struct zipl_envblk *zeb) if (fs_map(zeb->mfd.fd, zeb->offset, &blknr, zeb->size) != 0) goto error_close; - if (lseek64(dev_fd, blknr * (uint64_t)zeb->size, SEEK_SET) < 0) { + if (lseek(dev_fd, blknr * (off_t)zeb->size, SEEK_SET) < 0) { error_reason(strerror(errno)); goto error_close; } diff --git a/zkey/Makefile b/zkey/Makefile index 7211ad6c..3441a21d 100644 --- a/zkey/Makefile +++ b/zkey/Makefile @@ -37,7 +37,8 @@ endif libs = $(rootdir)/libutil/libutil.a -ALL_CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\" +ALL_CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\" \ + -D_FILE_OFFSET_BITS=64 detect-libcryptsetup.dep: echo "#include " > detect-libcryptsetup.dep diff --git a/zkey/zkey-cryptsetup.c b/zkey/zkey-cryptsetup.c index e81e88a5..632d3c2e 100644 --- a/zkey/zkey-cryptsetup.c +++ b/zkey/zkey-cryptsetup.c @@ -8,8 +8,6 @@ * it under the terms of the MIT license. See LICENSE for details. */ -#define _LARGEFILE64_SOURCE - #include #include #include @@ -547,10 +545,10 @@ static int keyfile_seek(int fd, size_t bytes) { size_t next_read; ssize_t bytes_r; - off64_t r; + off_t r; char *tmp; - r = lseek64(fd, bytes, SEEK_CUR); + r = lseek(fd, bytes, SEEK_CUR); if (r > 0) return 0; if (r < 0 && errno != ESPIPE)