qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Sandipan Das" <sandipan@linux.vnet.ibm.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: [Qemu-devel] [RISU PATCH] risu: Include <sys/user.h> on ppc64
Date: Fri,  7 Jun 2019 14:25:21 +0100	[thread overview]
Message-ID: <20190607132521.9637-1-peter.maydell@linaro.org> (raw)

To build the C parts of risu for ppc64le with recent glibc/kernel
headers, we need to include sys/user.h to avoid a compile error,
because sys/ucontext.h defines a struct which includes a pointer
to 'struct pt_regs' but does not provide a definition of that struct.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
I need this to be able to do the ppc64le cross-build on my
Ubuntu Bionic x86-64 system.

 risu_ppc64.c         | 2 ++
 risu_reginfo_ppc64.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/risu_ppc64.c b/risu_ppc64.c
index 83f8d1f..a3028f7 100644
--- a/risu_ppc64.c
+++ b/risu_ppc64.c
@@ -11,6 +11,8 @@
  *     based on Peter Maydell's risu_arm.c
  *****************************************************************************/
 
+#include <sys/user.h>
+
 #include "risu.h"
 
 void advance_pc(void *vuc)
diff --git a/risu_reginfo_ppc64.c b/risu_reginfo_ppc64.c
index f9d2f0d..071c951 100644
--- a/risu_reginfo_ppc64.c
+++ b/risu_reginfo_ppc64.c
@@ -16,6 +16,7 @@
 #include <string.h>
 #include <math.h>
 #include <stdlib.h>
+#include <sys/user.h>
 
 #include "risu.h"
 #include "risu_reginfo_ppc64.h"
-- 
2.20.1



             reply	other threads:[~2019-06-07 13:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-07 13:25 Peter Maydell [this message]
2019-06-07 14:00 ` [Qemu-devel] [RISU PATCH] risu: Include <sys/user.h> on ppc64 Alex Bennée
2019-06-10  4:25 ` Sandipan Das
2019-06-13 12:33   ` Peter Maydell

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=20190607132521.9637-1-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sandipan@linux.vnet.ibm.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).