9pfs: include linux/limits.h for XATTR_SIZE_MAX
cover 9pfs: include linux/limits.h for XATTR_SIZE_MAX
When compliling qemu with --enable-virtfs and musl libc, XATTR_SIZE_MAX is undeclared in v9fs_xattrcreate. Things compile fine with glibc as linux/limits.h is indirectly included via dirent.h.
Dan Robertson (1):
9pfs: include linux/limits.h for XATTR_SIZE_MAX
hw/9pfs/9p.c | 1 + 1 file changed, 1 insertion(+)
PATCH 1/1 9pfs: include linux/limits.h for XATTR_SIZE_MAX
linux/limits.h should be included for the XATTR_SIZE_MAX definition used by v9fs_xattrcreate.
--- hw/9pfs/9p.c | 1 + 1 file changed, 1 insertion(+)
hw/9pfs/9p.c +1 -0
@@ -28,6 +28,7 @@#include "sysemu/qtest.h" #include "qemu/xxhash.h" #include <math.h> +#include <linux/limits.h> int open_fd_hw;int total_open_fd;
Quoted 1 line · Dan Robertson
linux/limits.hshould be included for theXATTR_SIZE_MAXdefinition used
Maybe rewrite as <linux/limits.h> in subject & description (maintainer could do it for you).
Quoted 2 lines
by
v9fs_xattrcreate.
Quoted 19 lines
Signed-off-by Dan Robertson <[email protected]>--- hw/9pfs/9p.c | 1 + 1 file changed, 1 insertion(+)hw/9pfs/9p.c +1
-0@@ -28,6 +28,7 @@#include "sysemu/qtest.h" #include "qemu/xxhash.h" #include <math.h> +#include <linux/limits.h> int open_fd_hw;int total_open_fd;
Quoted 13 lines · On Freitag, 15. Mai 2020 22:30:15 CEST Dan Robertson wrote:
linux/limits.hshould be included for theXATTR_SIZE_MAXdefinition used byv9fs_xattrcreate.Signed-off-by Dan Robertson <[email protected]>--- hw/9pfs/9p.c | 1 + 1 file changed, 1 insertion(+)hw/9pfs/9p.c +0
-0
hw/9pfs/9p.c line 34
Quoted 7 lines
hw/9pfs/9p.c +1
-0@@ -28,6 +28,7 @@#include "sysemu/qtest.h" #include "qemu/xxhash.h" #include <math.h> +#include <linux/limits.h> int open_fd_hw;int total_open_fd;
Usually I would say that should be wrapped in some OS conditional way, but as usage of XATTR_SIZE_MAX is currently not in 9p code either, it's Ok for now.
Best regards,
Christian Schoenebeck
Greg Kurz
AppliedQuoted 5 lines · On Fri, 15 May 2020 20:30:15 +0000 Dan Robertson <[email protected]> wrote:
linux/limits.hshould be included for theXATTR_SIZE_MAXdefinition used byv9fs_xattrcreate.Signed-off-by Dan Robertson <[email protected]>---
Applied to 9p-next with R-b and Fixes tags, thanks.
Quoted 16 lines
hw/9pfs/9p.c | 1 + 1 file changed, 1 insertion(+)hw/9pfs/9p.c +1
-0@@ -28,6 +28,7 @@#include "sysemu/qtest.h" #include "qemu/xxhash.h" #include <math.h> +#include <linux/limits.h> int open_fd_hw;int total_open_fd;
Quoted 1 line · Greg Kurz
Applied to 9p-next with R-b and Fixes tags, thanks.
Great! Thanks for the feedback everyone.
Cheers,
- Dan