aboutsummaryrefslogtreecommitdiff
path: root/storage-daemon/qemu-storage-daemon.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2022-02-01 12:26:55 +0100
committerKevin Wolf <kwolf@redhat.com>2022-02-01 13:49:15 +0100
commit3c9c70347b8e636c08035f39288f8cdd2e68bbda (patch)
tree19ac03ff68efa3c5fae57b626c24ae74686a0835 /storage-daemon/qemu-storage-daemon.c
parentac50419460cc45a66214e6d1c3e9d0d670522f8a (diff)
block/export/fuse: Fix build failure on FreeBSD
When building on FreeBSD we get: [816/6851] Compiling C object libblockdev.fa.p/block_export_fuse.c.o ../block/export/fuse.c:628:16: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' if (mode & FALLOC_FL_KEEP_SIZE) { ^ ../block/export/fuse.c:651:16: error: use of undeclared identifier 'FALLOC_FL_PUNCH_HOLE' if (mode & FALLOC_FL_PUNCH_HOLE) { ^ ../block/export/fuse.c:652:22: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' if (!(mode & FALLOC_FL_KEEP_SIZE)) { ^ 3 errors generated. FAILED: libblockdev.fa.p/block_export_fuse.c.o Meson indeed reported FALLOC_FL_PUNCH_HOLE is not available: C compiler for the host machine: cc (clang 10.0.1 "FreeBSD clang version 10.0.1") Checking for function "fallocate" : NO Checking for function "posix_fallocate" : YES Header <linux/falloc.h> has symbol "FALLOC_FL_PUNCH_HOLE" : NO Header <linux/falloc.h> has symbol "FALLOC_FL_ZERO_RANGE" : NO ... Similarly to commit 304332039 ("block/export/fuse.c: fix musl build"), guard the code requiring FALLOC_FL_KEEP_SIZE / FALLOC_FL_PUNCH_HOLE definitions under CONFIG_FALLOCATE_PUNCH_HOLE #ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220201112655.344373-3-f4bug@amsat.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'storage-daemon/qemu-storage-daemon.c')
0 files changed, 0 insertions, 0 deletions