qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 9p: move limits.h include from 9p.c to 9p.h
@ 2022-03-30 18:19 Will Cohen
  2022-03-30 20:23 ` Philippe Mathieu-Daudé
  2022-03-30 21:31 ` Peter Maydell
  0 siblings, 2 replies; 11+ messages in thread
From: Will Cohen @ 2022-03-30 18:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: thuth, fabianfranz.oss, Christian Schoenebeck, Greg Kurz, keno,
	reactorcontrol, philippe.mathieu.daude, Will Cohen, hi

As noted by https://gitlab.com/qemu-project/qemu/-/issues/950, within
the patch set adding 9p functionality to darwin, the commit
38d7fd68b0c8775b5253ab84367419621aa032e6 introduced an issue where
limits.h, which defines XATTR_SIZE_MAX, is included in 9p.c, though the
referenced constant is needed in 9p.h. This commit fixes that issue by
moving the include to 9p.h.

Signed-off-by: Will Cohen <wwcohen@gmail.com>
---
 hw/9pfs/9p.c | 5 -----
 hw/9pfs/9p.h | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index dcaa602d4c..59c531ed47 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -33,11 +33,6 @@
 #include "migration/blocker.h"
 #include "qemu/xxhash.h"
 #include <math.h>
-#ifdef CONFIG_LINUX
-#include <linux/limits.h>
-#else
-#include <limits.h>
-#endif
 
 int open_fd_hw;
 int total_open_fd;
diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h
index af2635fae9..0ce4da375c 100644
--- a/hw/9pfs/9p.h
+++ b/hw/9pfs/9p.h
@@ -9,6 +9,11 @@
 #include "qemu/thread.h"
 #include "qemu/coroutine.h"
 #include "qemu/qht.h"
+#ifdef CONFIG_LINUX
+#include <linux/limits.h>
+#else
+#include <limits.h>
+#endif
 
 enum {
     P9_TLERROR = 6,
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-03-31 17:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-30 18:19 [PATCH] 9p: move limits.h include from 9p.c to 9p.h Will Cohen
2022-03-30 20:23 ` Philippe Mathieu-Daudé
2022-03-30 21:17   ` Will Cohen
2022-03-31 10:20     ` Christian Schoenebeck
2022-03-30 21:31 ` Peter Maydell
2022-03-30 21:55   ` Will Cohen
2022-03-31  8:03     ` Peter Maydell
2022-03-31 11:07       ` Christian Schoenebeck
2022-03-31 13:19         ` Will Cohen
2022-03-31 15:34           ` Christian Schoenebeck
2022-03-31 17:57             ` Will Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).