From: Andreas Dilger Date: Sat, 18 May 2024 07:27:20 +0000 (-0600) Subject: LU-17808 Revert "Remove explicit #define of _FILE_OFFSET_BITS" X-Git-Tag: v1.47.1-wc1~1 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F47%2F55147%2F3;p=tools%2Fe2fsprogs.git LU-17808 Revert "Remove explicit #define of _FILE_OFFSET_BITS" This reverts commit 3ab99d9b6022ffa369e8ce7ae5643a30028d0db1. this breaks building for Ubuntu systems. Change-Id: I4b2db67077d110f324e3037bbf4e047ef74ee987 Signed-off-by: Andreas Dilger Chabge-Id: I12345678901234567890123456789012345254035 Reviewed-on: https://review.whamcloud.com/c/tools/e2fsprogs/+/55147 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Li Dongyang --- diff --git a/lib/ext2fs/getenv.c b/lib/ext2fs/getenv.c index 409a78a..f279f7b 100644 --- a/lib/ext2fs/getenv.c +++ b/lib/ext2fs/getenv.c @@ -12,6 +12,13 @@ #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) #define _XOPEN_SOURCE 600 #define _DARWIN_C_SOURCE +#define _FILE_OFFSET_BITS 64 +#ifndef _LARGEFILE_SOURCE +#define _LARGEFILE_SOURCE +#endif +#ifndef _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE +#endif #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c index f8b5920..298c1f0 100644 --- a/lib/ext2fs/unix_io.c +++ b/lib/ext2fs/unix_io.c @@ -18,6 +18,7 @@ #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) #define _XOPEN_SOURCE 600 #define _DARWIN_C_SOURCE +#define _FILE_OFFSET_BITS 64 #ifndef _LARGEFILE_SOURCE #define _LARGEFILE_SOURCE #endif diff --git a/misc/create_inode.c b/misc/create_inode.c index 4e292a2..e2676a0 100644 --- a/misc/create_inode.c +++ b/misc/create_inode.c @@ -9,6 +9,7 @@ * %End-Header% */ +#define _FILE_OFFSET_BITS 64 #define _LARGEFILE64_SOURCE 1 #define _GNU_SOURCE 1 diff --git a/misc/create_inode_libarchive.c b/misc/create_inode_libarchive.c index 8705eb1..ebd62d4 100644 --- a/misc/create_inode_libarchive.c +++ b/misc/create_inode_libarchive.c @@ -9,6 +9,7 @@ * %End-Header% */ +#define _FILE_OFFSET_BITS 64 #define _LARGEFILE64_SOURCE 1 #define _GNU_SOURCE 1 diff --git a/misc/e2fuzz.c b/misc/e2fuzz.c index 9f60bcf..0ceece9 100644 --- a/misc/e2fuzz.c +++ b/misc/e2fuzz.c @@ -9,6 +9,7 @@ * %End-Header% */ #define _XOPEN_SOURCE 600 +#define _FILE_OFFSET_BITS 64 #define _LARGEFILE64_SOURCE 1 #define _GNU_SOURCE 1 diff --git a/misc/findsuper.c b/misc/findsuper.c index 8f275ea..1f5c3e7 100644 --- a/misc/findsuper.c +++ b/misc/findsuper.c @@ -81,6 +81,8 @@ * */ +#define _FILE_OFFSET_BITS 64 + #include "config.h" #include #include diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c index 177cd70..084ba28 100644 --- a/misc/fuse2fs.c +++ b/misc/fuse2fs.c @@ -8,6 +8,7 @@ * License. * %End-Header% */ +#define _FILE_OFFSET_BITS 64 #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif diff --git a/util/symlinks.c b/util/symlinks.c index 4c72156..e9d2b01 100644 --- a/util/symlinks.c +++ b/util/symlinks.c @@ -1,3 +1,11 @@ +#define _FILE_OFFSET_BITS 64 +#ifndef _LARGEFILE_SOURCE +#define _LARGEFILE_SOURCE +#endif +#ifndef _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE +#endif + #include #ifndef _POSIX_SOURCE #define _POSIX_SOURCE