[Buildroot] [PATCH 1/1] package/qemu: disable fuse-lseek on uclibc-ng

Yann E. MORIN yann.morin.1998 at free.fr
Fri Aug 27 20:11:40 UTC 2021


Fabrice, All,

On 2021-08-27 17:58 +0200, Fabrice Fontaine spake thusly:
> 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

I think the proper solution would be to #include <linux/fs.h>, maybe
guarded by #ifdef __linux__, like is done for example in:
block/file-posix.c .

And thus relax the requirement against musl at the same time?

Regards,
Yann E. MORIN.

> Fixes:
>  - http://autobuild.buildroot.org/results/33c90ebf04997f4d3557cfa66abc9cf9a3076137
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
> ---
>  package/qemu/qemu.mk | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
> index 0bd3eafadd..70cf441c9b 100644
> --- a/package/qemu/qemu.mk
> +++ b/package/qemu/qemu.mk
> @@ -94,11 +94,11 @@ endif
>  ifeq ($(BR2_PACKAGE_LIBFUSE3),y)
>  QEMU_OPTS += --enable-fuse
>  QEMU_DEPENDENCIES += libfuse3
> -# musl does not support SEEK_HOLE/SEEK_DATA
> -ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
> -QEMU_OPTS += --disable-fuse-lseek
> -else
> +# musl and uclibc-ng don't support SEEK_HOLE/SEEK_DATA
> +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
>  QEMU_OPTS += --enable-fuse-lseek
> +else
> +QEMU_OPTS += --disable-fuse-lseek
>  endif
>  else
>  QEMU_OPTS += --disable-fuse --disable-fuse-lseek
> -- 
> 2.32.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list