package/libfuse3: fix build failure due to missing __off64_t in musl
PATCH 1/1 package/libfuse3: fix build failure due to missing __off64_t in musl
Add upstream patch[0] that substitute __off64_t with off64_t that is present in glibc, uclibc and musl.
[0]: https://github.com/libfuse/libfuse/commit/19d95c0e701076407dc1f3cfd39e12e28b332927
Fixes:
http://autobuild.buildroot.net/results/a98/a984d275d949e8dc989870d2d2b6f6c7168d52bb/
--- .../0001-use-off_t-over-__off64_t.patch | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 package/libfuse3/0001-use-off_t-over-__off64_t.patch
package/libfuse3/0001-use-off_t-over-__off64_t.patch new file +56 -0
@@ -0,0 +1,56 @@ +From 19d95c0e701076407dc1f3cfd39e12e28b332927 Mon Sep 17 00:00:00 2001 +From: psykose <[email protected]> +Date: Sat, 14 Jan 2023 21:31:56 +0000 +Subject: [PATCH] use off_t over __off64_t + +when -D_FILE_OFFSET_BITS=64 is defined, the off_t type is 64 bits wide +already. the fuse_common.h header already checks for this, and errors +when it is not, so be consistent with all the other uses of off_t. + +some libcs like musl do not have a 32-bit off_t type, and don't define +__off64_t. + +Signed-off-by: Giulio Benetti <[email protected]> +--- + example/hello_ll_uds.c | 4 ++-- + include/fuse_lowlevel.h | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/example/hello_ll_uds.c b/example/hello_ll_uds.c +index c1f64d7..f291fed 100644 +--- a/example/hello_ll_uds.c ++++ b/example/hello_ll_uds.c +@@ -277,8 +277,8 @@ static ssize_t stream_read(int fd, void *buf, size_t buf_len, void *userdata) { + return (res == -1) ? res : (res + prev_res); + } + +-static ssize_t stream_splice_send(int fdin, __off64_t *offin, int fdout, +- __off64_t *offout, size_t len, ++static ssize_t stream_splice_send(int fdin, off_t *offin, int fdout, ++ off_t *offout, size_t len, + unsigned int flags, void *userdata) { + (void)userdata; + +diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h +index ff0d966..96088d7 100644 +--- a/include/fuse_lowlevel.h ++++ b/include/fuse_lowlevel.h +@@ -130,11 +130,11 @@ struct fuse_forget_data { + struct fuse_custom_io { + ssize_t (*writev)(int fd, struct iovec *iov, int count, void *userdata); + ssize_t (*read)(int fd, void *buf, size_t buf_len, void *userdata); +- ssize_t (*splice_receive)(int fdin, __off64_t *offin, int fdout, +- __off64_t *offout, size_t len, ++ ssize_t (*splice_receive)(int fdin, off_t *offin, int fdout, ++ off_t *offout, size_t len, + unsigned int flags, void *userdata); +- ssize_t (*splice_send)(int fdin, __off64_t *offin, int fdout, +- __off64_t *offout, size_t len, ++ ssize_t (*splice_send)(int fdin, off_t *offin, int fdout, ++ off_t *offout, size_t len, + unsigned int flags, void *userdata); + }; + +-- +2.34.1 +
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
This patch is superseded by this one:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
Best regards
Signature · 2 lines
Giulio Benetti Benetti Engineering sas
Quoted 66 lines · Giulio Benetti
Add upstream patch[0] that substitute
__off64_twithoff64_tthat is present in glibc, uclibc and musl.[0]: https://github.com/libfuse/libfuse/commit/19d95c0e701076407dc1f3cfd39e12e28b332927
Fixes:
http://autobuild.buildroot.net/results/a98/a984d275d949e8dc989870d2d2b6f6c7168d52bb/Signed-off-by Giulio Benetti <[email protected]>--- .../0001-use-off_t-over-__off64_t.patch | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+)create mode 100644
package/libfuse3/0001-use-off_t-over-__off64_t.patchpackage/libfuse3/0001-use-off_t-over-__off64_t.patch new file +46
-0@@ -0,0 +1,56 @@ +From 19d95c0e701076407dc1f3cfd39e12e28b332927 Mon Sep 17 00:00:00 2001 +From: psykose <[email protected]> +Date: Sat, 14 Jan 2023 21:31:56 +0000 +Subject: [PATCH] use off_t over __off64_t + +when -D_FILE_OFFSET_BITS=64 is defined, the off_t type is 64 bits wide +already. the fuse_common.h header already checks for this, and errors +when it is not, so be consistent with all the other uses of off_t. + +some libcs like musl do not have a 32-bit off_t type, and don't define +__off64_t. + +Signed-off-by: Giulio Benetti <[email protected]> +--- + example/hello_ll_uds.c | 4 ++-- + include/fuse_lowlevel.h | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/example/hello_ll_uds.c b/example/hello_ll_uds.c +index c1f64d7..f291fed 100644 +--- a/example/hello_ll_uds.c ++++ b/example/hello_ll_uds.c +@@ -277,8 +277,8 @@ static ssize_t stream_read(int fd, void *buf, size_t buf_len, void *userdata) { + return (res == -1) ? res : (res + prev_res); + } + +-static ssize_t stream_splice_send(int fdin, __off64_t *offin, int fdout, +- __off64_t *offout, size_t len, ++static ssize_t stream_splice_send(int fdin, off_t *offin, int fdout, ++ off_t *offout, size_t len, + unsigned int flags, void *userdata) { + (void)userdata; + +diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h +index ff0d966..96088d7 100644 +--- a/include/fuse_lowlevel.h ++++ b/include/fuse_lowlevel.h +@@ -130,11 +130,11 @@ struct fuse_forget_data { + struct fuse_custom_io { + ssize_t (*writev)(int fd, struct iovec *iov, int count, void *userdata); + ssize_t (*read)(int fd, void *buf, size_t buf_len, void *userdata); +- ssize_t (*splice_receive)(int fdin, __off64_t *offin, int fdout, +- __off64_t *offout, size_t len, ++ ssize_t (*splice_receive)(int fdin, off_t *offin, int fdout, ++ off_t *offout, size_t len, + unsigned int flags, void *userdata);
package/libfuse3/0001-use-off_t-over-__off64_t.patch line 56
Quoted 10 lines
package/libfuse3/0001-use-off_t-over-__off64_t.patch new file +10
-0+- ssize_t (*splice_send)(int fdin, __off64_t *offin, int fdout, +- __off64_t *offout, size_t len, ++ ssize_t (*splice_send)(int fdin, off_t *offin, int fdout, ++ off_t *offout, size_t len, + unsigned int flags, void *userdata); + }; + +-- +2.34.1 +
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot