[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] block/export/fuse.c: fix musl build
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] block/export/fuse.c: fix musl build |
Date: |
Mon, 25 Oct 2021 13:01:36 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
On 10/22/21 11:52, Fabrice Fontaine wrote:
> Include linux/falloc.h if CONFIG_FALLOCATE_ZERO_RANGE is defined to fix
> https://gitlab.com/qemu-project/qemu/-/commit/50482fda98bd62e072c30b7ea73c985c4e9d9bbb
> and avoid the following build failure on musl:
>
> ../block/export/fuse.c: In function 'fuse_fallocate':
> ../block/export/fuse.c:643:21: error: 'FALLOC_FL_ZERO_RANGE' undeclared
> (first use in this function)
> 643 | else if (mode & FALLOC_FL_ZERO_RANGE) {
> | ^~~~~~~~~~~~~~~~~~~~
>
> Fixes:
> -
> http://autobuild.buildroot.org/results/be24433a429fda681fb66698160132c1c99bc53b
The 2 previous lines aren't really helpful, however this is:
Fixes: 50482fda98b ("block/export/fuse.c: fix musl build")
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> block/export/fuse.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/block/export/fuse.c b/block/export/fuse.c
> index 2e3bf8270b..823c126d23 100644
> --- a/block/export/fuse.c
> +++ b/block/export/fuse.c
> @@ -31,6 +31,10 @@
> #include <fuse.h>
> #include <fuse_lowlevel.h>
>
> +#if defined(CONFIG_FALLOCATE_ZERO_RANGE)
> +#include <linux/falloc.h>
> +#endif
> +
> #ifdef __linux__
> #include <linux/fs.h>
> #endif
>
With 'Fixes:' tag:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>