Use _FILE_OFFSET_BITS=64 instead of _LARGEFILE64_SOURCE everywhere

Allows using more portable function/type names while still using 64-bit
values on 32-bit glibc systems.

Github-ID: https://github.com/ibm-s390-linux/s390-tools/pull/193
Signed-off-by: Sertonix <sertonix@posteo.net>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Sertonix
2025-10-28 09:28:33 +01:00
committed by Jan Höppner
parent b1e4f6f331
commit 805a4d4408
4 changed files with 6 additions and 8 deletions
+2 -1
View File
@@ -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 <libcryptsetup.h>" > detect-libcryptsetup.dep
+2 -4
View File
@@ -8,8 +8,6 @@
* it under the terms of the MIT license. See LICENSE for details.
*/
#define _LARGEFILE64_SOURCE
#include <ctype.h>
#include <dlfcn.h>
#include <err.h>
@@ -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)