You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.6 KiB

  1. From 28031d5c7427aec6d6138920b92c59b999a349ed Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sat, 28 Aug 2021 00:03:01 +0200
  4. Subject: [PATCH] block/export/fuse.c: fix fuse-lseek on uclibc or musl
  5. Include linux/fs.h to avoid the following build failure on uclibc or
  6. musl raised since version 6.0.0:
  7. ../block/export/fuse.c: In function 'fuse_lseek':
  8. ../block/export/fuse.c:641:19: error: 'SEEK_HOLE' undeclared (first use in this function)
  9. 641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
  10. | ^~~~~~~~~
  11. ../block/export/fuse.c:641:19: note: each undeclared identifier is reported only once for each function it appears in
  12. ../block/export/fuse.c:641:42: error: 'SEEK_DATA' undeclared (first use in this function); did you mean 'SEEK_SET'?
  13. 641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
  14. | ^~~~~~~~~
  15. | SEEK_SET
  16. Fixes:
  17. - http://autobuild.buildroot.org/results/33c90ebf04997f4d3557cfa66abc9cf9a3076137
  18. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  19. Message-Id: <20210827220301.272887-1-fontaine.fabrice@gmail.com>
  20. Signed-off-by: Hanna Reitz <hreitz@redhat.com>
  21. ---
  22. block/export/fuse.c | 3 +++
  23. 1 file changed, 3 insertions(+)
  24. --- a/block/export/fuse.c
  25. +++ b/block/export/fuse.c
  26. @@ -38,6 +38,9 @@
  27. /* Prevent overly long bounce buffer allocations */
  28. #define FUSE_MAX_BOUNCE_BYTES (MIN(BDRV_REQUEST_MAX_BYTES, 64 * 1024 * 1024))
  29. +#ifdef __linux__
  30. +#include <linux/fs.h>
  31. +#endif
  32. typedef struct FuseExport {
  33. BlockExport common;