qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: qemu-devel@nongnu.org
Cc: Greg Kurz <groug@kaod.org>, Thomas Huth <thuth@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	Warner Losh <imp@bsdimp.com>, Bin Meng <bin.meng@windriver.com>
Subject: [PATCH] 9pfs: fix missing sys/mount.h include
Date: Fri, 28 Oct 2022 13:21:51 +0200	[thread overview]
Message-ID: <E1ooNWu-0002oC-76@lizzy.crudebyte.com> (raw)

Fixes the following build error:

  fsdev/file-op-9p.h:156:56: error: declaration of 'struct statfs' will
  not be visible outside of this function [-Werror,-Wvisibility]
    int (*statfs)(FsContext *s, V9fsPath *path, struct statfs *stbuf);
                                                       ^

As Windows neither has statfs, nor sys/mount.h, don't include it there.

Fixes: 684f91203439 ("tests/9p: split virtio-9p-test.c ...")
Link: https://lore.kernel.org/all/2690108.PsDodiG1Zx@silver/
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
---
 fsdev/file-op-9p.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h
index 4997677460..700f1857b4 100644
--- a/fsdev/file-op-9p.h
+++ b/fsdev/file-op-9p.h
@@ -24,6 +24,8 @@
 #endif
 #ifdef CONFIG_DARWIN
 # include <sys/param.h>
+#endif
+#ifndef CONFIG_WIN32
 # include <sys/mount.h>
 #endif
 
-- 
2.30.2



             reply	other threads:[~2022-10-28 11:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28 11:21 Christian Schoenebeck [this message]
2022-10-28 11:42 ` [PATCH] 9pfs: fix missing sys/mount.h include Thomas Huth
2022-10-28 12:14   ` Christian Schoenebeck
2022-10-28 12:27     ` Thomas Huth
2022-10-28 13:39 ` Bin Meng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1ooNWu-0002oC-76@lizzy.crudebyte.com \
    --to=qemu_oss@crudebyte.com \
    --cc=bin.meng@windriver.com \
    --cc=groug@kaod.org \
    --cc=imp@bsdimp.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).