* [PATCH] fuse2fs: explicitly set _FILE_OFFSET_BITS again
@ 2024-05-29 18:12 Darrick J. Wong
2024-10-25 3:53 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2024-05-29 18:12 UTC (permalink / raw)
To: Theodore Ts'o, linux-ext4
From: Darrick J. Wong <djwong@kernel.org>
In commit 3ab99d9b602, the build system was changed not to set
_FILE_OFFSET_BITS explicitly due to some weird error on mips64el.
Unfortunately, this breaks the aarch64 Debian build because libfuse
2.9.9 requires this value to be set explicitly. Restore this dumb
preprocessor symbol dependency with even more hackery as documented in
the commit.
Fixes: 3ab99d9b602 ("Remove explicit #define of _FILE_OFFSET_BITS")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
misc/fuse2fs.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 56a0d545..01293868 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -26,7 +26,23 @@
#endif
#include <sys/ioctl.h>
#include <unistd.h>
+#ifdef __SET_FOB_FOR_FUSE
+# error Do not set magic value __SET_FOB_FOR_FUSE!!!!
+#endif
+#ifndef _FILE_OFFSET_BITS
+/*
+ * Old versions of libfuse (e.g. Debian 2.9.9 package) required that the build
+ * system set _FILE_OFFSET_BITS explicitly, even if doing so isn't required to
+ * get a 64-bit off_t. AC_SYS_LARGEFILE doesn't set any _FILE_OFFSET_BITS if
+ * it's not required (such as on aarch64), so we must inject it here.
+ */
+# define __SET_FOB_FOR_FUSE
+# define _FILE_OFFSET_BITS 64
+#endif /* _FILE_OFFSET_BITS */
#include <fuse.h>
+#ifdef __SET_FOB_FOR_FUSE
+# undef _FILE_OFFSET_BITS
+#endif /* __SET_FOB_FOR_FUSE */
#include <inttypes.h>
#include "ext2fs/ext2fs.h"
#include "ext2fs/ext2_fs.h"
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fuse2fs: explicitly set _FILE_OFFSET_BITS again
2024-05-29 18:12 [PATCH] fuse2fs: explicitly set _FILE_OFFSET_BITS again Darrick J. Wong
@ 2024-10-25 3:53 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2024-10-25 3:53 UTC (permalink / raw)
To: linux-ext4, Darrick J. Wong; +Cc: Theodore Ts'o
On Wed, 29 May 2024 11:12:14 -0700, Darrick J. Wong wrote:
> In commit 3ab99d9b602, the build system was changed not to set
> _FILE_OFFSET_BITS explicitly due to some weird error on mips64el.
> Unfortunately, this breaks the aarch64 Debian build because libfuse
> 2.9.9 requires this value to be set explicitly. Restore this dumb
> preprocessor symbol dependency with even more hackery as documented in
> the commit.
>
> [...]
Applied, thanks!
[1/1] fuse2fs: explicitly set _FILE_OFFSET_BITS again
commit: fb702218ab47b045cbbaf3268984fbdc5f75632e
Best regards,
--
Theodore Ts'o <tytso@mit.edu>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-25 3:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-29 18:12 [PATCH] fuse2fs: explicitly set _FILE_OFFSET_BITS again Darrick J. Wong
2024-10-25 3:53 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox