* [Buildroot] [PATCH v2, 1/1] package/qemu: fix fuse-lseek on uclibc-ng and musl
@ 2021-08-27 22:05 Fabrice Fontaine
2021-09-11 13:00 ` Arnout Vandecappelle
2021-09-12 19:46 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2021-08-27 22:05 UTC (permalink / raw)
To: buildroot; +Cc: Romain Naour, Fabrice Fontaine
Fix the following build failure on uclibc-ng raised since bump to
version 6.0.0 in commit 6b86c9335fc3ff381878156c6243454d4b688df9:
../block/export/fuse.c: In function 'fuse_lseek':
../block/export/fuse.c:641:19: error: 'SEEK_HOLE' undeclared (first use in this function)
641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
| ^~~~~~~~~
../block/export/fuse.c:641:19: note: each undeclared identifier is reported only once for each function it appears in
../block/export/fuse.c:641:42: error: 'SEEK_DATA' undeclared (first use in this function); did you mean 'SEEK_SET'?
641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
| ^~~~~~~~~
| SEEK_SET
Fixes:
- http://autobuild.buildroot.org/results/33c90ebf04997f4d3557cfa66abc9cf9a3076137
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2 (after review of Yann E. Morin):
- Fix build instead of disabling fuse-lseek on uclibc-ng and musl
...e.c-fix-fuse-lseek-on-uclibc-or-musl.patch | 44 +++++++++++++++++++
package/qemu/qemu.mk | 8 +---
2 files changed, 45 insertions(+), 7 deletions(-)
create mode 100644 package/qemu/0006-block-export-fuse.c-fix-fuse-lseek-on-uclibc-or-musl.patch
diff --git a/package/qemu/0006-block-export-fuse.c-fix-fuse-lseek-on-uclibc-or-musl.patch b/package/qemu/0006-block-export-fuse.c-fix-fuse-lseek-on-uclibc-or-musl.patch
new file mode 100644
index 0000000000..137371c51f
--- /dev/null
+++ b/package/qemu/0006-block-export-fuse.c-fix-fuse-lseek-on-uclibc-or-musl.patch
@@ -0,0 +1,44 @@
+From 8c3fcbf23fe31cf56f21ce1737bf22fe65fc553b Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Fri, 27 Aug 2021 23:40:01 +0200
+Subject: [PATCH] block/export/fuse.c: fix fuse-lseek on uclibc or musl
+
+Include linux/fs.h to avoid the following build failure on uclibc or
+musl raised since version 6.0.0:
+
+../block/export/fuse.c: In function 'fuse_lseek':
+../block/export/fuse.c:641:19: error: 'SEEK_HOLE' undeclared (first use in this function)
+ 641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
+ | ^~~~~~~~~
+../block/export/fuse.c:641:19: note: each undeclared identifier is reported only once for each function it appears in
+../block/export/fuse.c:641:42: error: 'SEEK_DATA' undeclared (first use in this function); did you mean 'SEEK_SET'?
+ 641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
+ | ^~~~~~~~~
+ | SEEK_SET
+
+Fixes:
+ - http://autobuild.buildroot.org/results/33c90ebf04997f4d3557cfa66abc9cf9a3076137
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: sent to qemu-devel@nongnu.org]
+---
+ block/export/fuse.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/block/export/fuse.c b/block/export/fuse.c
+index fc7b07d2b5..2e3bf8270b 100644
+--- a/block/export/fuse.c
++++ b/block/export/fuse.c
+@@ -31,6 +31,9 @@
+ #include <fuse.h>
+ #include <fuse_lowlevel.h>
+
++#ifdef __linux__
++#include <linux/fs.h>
++#endif
+
+ /* Prevent overly long bounce buffer allocations */
+ #define FUSE_MAX_BOUNCE_BYTES (MIN(BDRV_REQUEST_MAX_BYTES, 64 * 1024 * 1024))
+--
+2.32.0
+
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 0bd3eafadd..a58bc9024a 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -92,14 +92,8 @@ QEMU_OPTS += --disable-tools
endif
ifeq ($(BR2_PACKAGE_LIBFUSE3),y)
-QEMU_OPTS += --enable-fuse
+QEMU_OPTS += --enable-fuse --enable-fuse-lseek
QEMU_DEPENDENCIES += libfuse3
-# musl does not support SEEK_HOLE/SEEK_DATA
-ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
-QEMU_OPTS += --disable-fuse-lseek
-else
-QEMU_OPTS += --enable-fuse-lseek
-endif
else
QEMU_OPTS += --disable-fuse --disable-fuse-lseek
endif
--
2.32.0
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH v2, 1/1] package/qemu: fix fuse-lseek on uclibc-ng and musl
2021-08-27 22:05 [Buildroot] [PATCH v2, 1/1] package/qemu: fix fuse-lseek on uclibc-ng and musl Fabrice Fontaine
@ 2021-09-11 13:00 ` Arnout Vandecappelle
2021-09-12 19:46 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2021-09-11 13:00 UTC (permalink / raw)
To: Fabrice Fontaine, buildroot; +Cc: Romain Naour
On 28/08/2021 00:05, Fabrice Fontaine wrote:
> Fix the following build failure on uclibc-ng raised since bump to
> version 6.0.0 in commit 6b86c9335fc3ff381878156c6243454d4b688df9:
>
> ../block/export/fuse.c: In function 'fuse_lseek':
> ../block/export/fuse.c:641:19: error: 'SEEK_HOLE' undeclared (first use in this function)
> 641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
> | ^~~~~~~~~
> ../block/export/fuse.c:641:19: note: each undeclared identifier is reported only once for each function it appears in
> ../block/export/fuse.c:641:42: error: 'SEEK_DATA' undeclared (first use in this function); did you mean 'SEEK_SET'?
> 641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
> | ^~~~~~~~~
> | SEEK_SET
>
> Fixes:
> - http://autobuild.buildroot.org/results/33c90ebf04997f4d3557cfa66abc9cf9a3076137
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2 (after review of Yann E. Morin):
> - Fix build instead of disabling fuse-lseek on uclibc-ng and musl
>
> ...e.c-fix-fuse-lseek-on-uclibc-or-musl.patch | 44 +++++++++++++++++++
> package/qemu/qemu.mk | 8 +---
> 2 files changed, 45 insertions(+), 7 deletions(-)
> create mode 100644 package/qemu/0006-block-export-fuse.c-fix-fuse-lseek-on-uclibc-or-musl.patch
>
> diff --git a/package/qemu/0006-block-export-fuse.c-fix-fuse-lseek-on-uclibc-or-musl.patch b/package/qemu/0006-block-export-fuse.c-fix-fuse-lseek-on-uclibc-or-musl.patch
> new file mode 100644
> index 0000000000..137371c51f
> --- /dev/null
> +++ b/package/qemu/0006-block-export-fuse.c-fix-fuse-lseek-on-uclibc-or-musl.patch
> @@ -0,0 +1,44 @@
> +From 8c3fcbf23fe31cf56f21ce1737bf22fe65fc553b Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Fri, 27 Aug 2021 23:40:01 +0200
> +Subject: [PATCH] block/export/fuse.c: fix fuse-lseek on uclibc or musl
> +
> +Include linux/fs.h to avoid the following build failure on uclibc or
> +musl raised since version 6.0.0:
> +
> +../block/export/fuse.c: In function 'fuse_lseek':
> +../block/export/fuse.c:641:19: error: 'SEEK_HOLE' undeclared (first use in this function)
> + 641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
> + | ^~~~~~~~~
> +../block/export/fuse.c:641:19: note: each undeclared identifier is reported only once for each function it appears in
> +../block/export/fuse.c:641:42: error: 'SEEK_DATA' undeclared (first use in this function); did you mean 'SEEK_SET'?
> + 641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
> + | ^~~~~~~~~
> + | SEEK_SET
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/33c90ebf04997f4d3557cfa66abc9cf9a3076137
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Upstream status: sent to qemu-devel@nongnu.org]
I've replaced this with the link to patchwork [1] and applied to master, thanks.
Regards,
Arnout
[0]
https://patchwork.ozlabs.org/project/qemu-devel/patch/20210827220301.272887-1-fontaine.fabrice@gmail.com/
> +---
> + block/export/fuse.c | 3 +++
> + 1 file changed, 3 insertions(+)
> +
> +diff --git a/block/export/fuse.c b/block/export/fuse.c
> +index fc7b07d2b5..2e3bf8270b 100644
> +--- a/block/export/fuse.c
> ++++ b/block/export/fuse.c
> +@@ -31,6 +31,9 @@
> + #include <fuse.h>
> + #include <fuse_lowlevel.h>
> +
> ++#ifdef __linux__
> ++#include <linux/fs.h>
> ++#endif
> +
> + /* Prevent overly long bounce buffer allocations */
> + #define FUSE_MAX_BOUNCE_BYTES (MIN(BDRV_REQUEST_MAX_BYTES, 64 * 1024 * 1024))
> +--
> +2.32.0
> +
> diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
> index 0bd3eafadd..a58bc9024a 100644
> --- a/package/qemu/qemu.mk
> +++ b/package/qemu/qemu.mk
> @@ -92,14 +92,8 @@ QEMU_OPTS += --disable-tools
> endif
>
> ifeq ($(BR2_PACKAGE_LIBFUSE3),y)
> -QEMU_OPTS += --enable-fuse
> +QEMU_OPTS += --enable-fuse --enable-fuse-lseek
> QEMU_DEPENDENCIES += libfuse3
> -# musl does not support SEEK_HOLE/SEEK_DATA
> -ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
> -QEMU_OPTS += --disable-fuse-lseek
> -else
> -QEMU_OPTS += --enable-fuse-lseek
> -endif
> else
> QEMU_OPTS += --disable-fuse --disable-fuse-lseek
> endif
>
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH v2, 1/1] package/qemu: fix fuse-lseek on uclibc-ng and musl
2021-08-27 22:05 [Buildroot] [PATCH v2, 1/1] package/qemu: fix fuse-lseek on uclibc-ng and musl Fabrice Fontaine
2021-09-11 13:00 ` Arnout Vandecappelle
@ 2021-09-12 19:46 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2021-09-12 19:46 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Romain Naour, buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Fix the following build failure on uclibc-ng raised since bump to
> version 6.0.0 in commit 6b86c9335fc3ff381878156c6243454d4b688df9:
> ../block/export/fuse.c: In function 'fuse_lseek':
> ../block/export/fuse.c:641:19: error: 'SEEK_HOLE' undeclared (first use in this function)
> 641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
> | ^~~~~~~~~
> ../block/export/fuse.c:641:19: note: each undeclared identifier is
> reported only once for each function it appears in
> ../block/export/fuse.c:641:42: error: 'SEEK_DATA' undeclared (first
> use in this function); did you mean 'SEEK_SET'?
> 641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
> | ^~~~~~~~~
> | SEEK_SET
> Fixes:
> - http://autobuild.buildroot.org/results/33c90ebf04997f4d3557cfa66abc9cf9a3076137
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2 (after review of Yann E. Morin):
> - Fix build instead of disabling fuse-lseek on uclibc-ng and musl
Committed to 2021.08.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-12 19:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 22:05 [Buildroot] [PATCH v2, 1/1] package/qemu: fix fuse-lseek on uclibc-ng and musl Fabrice Fontaine
2021-09-11 13:00 ` Arnout Vandecappelle
2021-09-12 19:46 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.