aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2024-04-30 19:54:08 -0400
committerTheodore Ts'o <tytso@mit.edu>2024-04-30 19:54:08 -0400
commit3ab99d9b6022ffa369e8ce7ae5643a30028d0db1 (patch)
treeaf47c069b47f44cc2994693291d2b0736b9e05b0
parent1b042c23ca782c1af06695bf61528f0969378bdc (diff)
downloade2fsprogs-3ab99d9b6022ffa369e8ce7ae5643a30028d0db1.tar.gz
Remove explicit #define of _FILE_OFFSET_BITS
The problem with explicitly setting _FILE_OFFSET_BITS is that it's not necessarily a no-op on a 64-bit platform with a 64-bit off_t. Apparently glibc's mips64el which end up using a different structure definition for struct stat, and this causes a compatibility problem with libarchive. It's not needed on mips64el, since off_t is 64-bits, but it actually causes problems. So remove it, since we now use the autoconf's AC_SYS_LARGEFILE, which will set _FILE_OFFSET_BITS when it is necessary (such as on a 32-bit i386 Linux platform), and will skip it when it is unnecessary. Addresses-Debian-Bug: #1070042 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--lib/ext2fs/getenv.c7
-rw-r--r--lib/ext2fs/unix_io.c1
-rw-r--r--misc/create_inode.c1
-rw-r--r--misc/create_inode_libarchive.c1
-rw-r--r--misc/e2fuzz.c1
-rw-r--r--misc/findsuper.c2
-rw-r--r--misc/fuse2fs.c1
-rw-r--r--util/symlinks.c8
8 files changed, 0 insertions, 22 deletions
diff --git a/lib/ext2fs/getenv.c b/lib/ext2fs/getenv.c
index f279f7b42..409a78acf 100644
--- a/lib/ext2fs/getenv.c
+++ b/lib/ext2fs/getenv.c
@@ -12,13 +12,6 @@
#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 b06df0681..4b4f25a49 100644
--- a/lib/ext2fs/unix_io.c
+++ b/lib/ext2fs/unix_io.c
@@ -18,7 +18,6 @@
#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 e2676a057..4e292a2d2 100644
--- a/misc/create_inode.c
+++ b/misc/create_inode.c
@@ -9,7 +9,6 @@
* %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 ebd62d449..8705eb168 100644
--- a/misc/create_inode_libarchive.c
+++ b/misc/create_inode_libarchive.c
@@ -9,7 +9,6 @@
* %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 0ceece9e6..9f60bcf44 100644
--- a/misc/e2fuzz.c
+++ b/misc/e2fuzz.c
@@ -9,7 +9,6 @@
* %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 1f5c3e72f..8f275eac9 100644
--- a/misc/findsuper.c
+++ b/misc/findsuper.c
@@ -81,8 +81,6 @@
*
*/
-#define _FILE_OFFSET_BITS 64
-
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 5927fdf98..56a0d5458 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -8,7 +8,6 @@
* 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 e9d2b011d..4c721560d 100644
--- a/util/symlinks.c
+++ b/util/symlinks.c
@@ -1,11 +1,3 @@
-#define _FILE_OFFSET_BITS 64
-#ifndef _LARGEFILE_SOURCE
-#define _LARGEFILE_SOURCE
-#endif
-#ifndef _LARGEFILE64_SOURCE
-#define _LARGEFILE64_SOURCE
-#endif
-
#include <unistd.h>
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE