Skip to contentSkip to conversation

9pfs: include linux/limits.h for XATTR_SIZE_MAX

PATCH Applied Dan Robertson 4 participants 6 messages May 16, 2020

lore
Share & tools
lore
#0 lore raw

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(+)
#1 lore raw

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
index a2a14b5979..68c2df7333 100644
@@ -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;
Reviewed-by on v1 1/1
#2 lore raw
Quoted 1 line · Dan Robertson

linux/limits.h should be included for the XATTR_SIZE_MAX definition used

Maybe rewrite as <linux/limits.h> in subject & description (maintainer could do it for you).

Quoted 2 lines

by v9fs_xattrcreate.

Fixes 3b79ef2cf48
Quoted 19 lines
---
  hw/9pfs/9p.c | 1 +
  1 file changed, 1 insertion(+)
hw/9pfs/9p.c +1 -0
index a2a14b5979..68c2df7333 100644
@@ -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;
Reviewed-by on v1 1/1
#3 lore raw
In reply to Dan Robertson
Quoted 13 lines · On Freitag, 15. Mai 2020 22:30:15 CEST Dan Robertson wrote:

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 +0 -0
index a2a14b5979..68c2df7333 100644

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

Applied
#4 lore raw
In reply to Dan Robertson
Quoted 5 lines · On Fri, 15 May 2020 20:30:15 +0000 Dan Robertson <[email protected]> wrote:

linux/limits.h should be included for the XATTR_SIZE_MAX definition used by v9fs_xattrcreate.

---

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
index a2a14b5979..68c2df7333 100644
@@ -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;
#5 lore raw
Quoted 1 line · Greg Kurz

Applied to 9p-next with R-b and Fixes tags, thanks.

Great! Thanks for the feedback everyone.

Cheers,

- Dan