1*4882a593SmuzhiyunFrom 304332039014679b809f606e2f227ee0fc43a451 Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3*4882a593SmuzhiyunDate: Fri, 22 Oct 2021 11:52:09 +0200 4*4882a593SmuzhiyunSubject: [PATCH] block/export/fuse.c: fix musl build 5*4882a593SmuzhiyunMIME-Version: 1.0 6*4882a593SmuzhiyunContent-Type: text/plain; charset=UTF-8 7*4882a593SmuzhiyunContent-Transfer-Encoding: 8bit 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunInclude linux/falloc.h if CONFIG_FALLOCATE_ZERO_RANGE is defined to fix 10*4882a593Smuzhiyunhttps://gitlab.com/qemu-project/qemu/-/commit/50482fda98bd62e072c30b7ea73c985c4e9d9bbb 11*4882a593Smuzhiyunand avoid the following build failure on musl: 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun../block/export/fuse.c: In function 'fuse_fallocate': 14*4882a593Smuzhiyun../block/export/fuse.c:643:21: error: 'FALLOC_FL_ZERO_RANGE' undeclared (first use in this function) 15*4882a593Smuzhiyun 643 | else if (mode & FALLOC_FL_ZERO_RANGE) { 16*4882a593Smuzhiyun | ^~~~~~~~~~~~~~~~~~~~ 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunFixes: 19*4882a593Smuzhiyun - http://autobuild.buildroot.org/results/be24433a429fda681fb66698160132c1c99bc53b 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunFixes: 50482fda98b ("block/export/fuse.c: fix musl build") 22*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 23*4882a593SmuzhiyunMessage-Id: <20211022095209.1319671-1-fontaine.fabrice@gmail.com> 24*4882a593SmuzhiyunReviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> 25*4882a593SmuzhiyunSigned-off-by: Kevin Wolf <kwolf@redhat.com> 26*4882a593Smuzhiyun[Retrieved from: 27*4882a593Smuzhiyunhttps://gitlab.com/qemu-project/qemu/-/commit/304332039014679b809f606e2f227ee0fc43a451] 28*4882a593Smuzhiyun--- 29*4882a593Smuzhiyun block/export/fuse.c | 4 ++++ 30*4882a593Smuzhiyun 1 file changed, 4 insertions(+) 31*4882a593Smuzhiyun 32*4882a593Smuzhiyundiff --git a/block/export/fuse.c b/block/export/fuse.c 33*4882a593Smuzhiyunindex 2e3bf8270b..823c126d23 100644 34*4882a593Smuzhiyun--- a/block/export/fuse.c 35*4882a593Smuzhiyun+++ b/block/export/fuse.c 36*4882a593Smuzhiyun@@ -31,6 +31,10 @@ 37*4882a593Smuzhiyun #include <fuse.h> 38*4882a593Smuzhiyun #include <fuse_lowlevel.h> 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun+#if defined(CONFIG_FALLOCATE_ZERO_RANGE) 41*4882a593Smuzhiyun+#include <linux/falloc.h> 42*4882a593Smuzhiyun+#endif 43*4882a593Smuzhiyun+ 44*4882a593Smuzhiyun #ifdef __linux__ 45*4882a593Smuzhiyun #include <linux/fs.h> 46*4882a593Smuzhiyun #endif 47*4882a593Smuzhiyun-- 48*4882a593SmuzhiyunGitLab 49*4882a593Smuzhiyun 50