aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-06-07 14:25:21 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-06-13 13:33:00 +0100
commit22735abfc99240cb5bc614ee1ce688670a9599e2 (patch)
tree57fcb0e6325127b9c08af839a90a7032cb7d69db
parent18e5ed202b773d8a2877fbcd2c4b2ebc951f2e23 (diff)
downloadrisu-22735abfc99240cb5bc614ee1ce688670a9599e2.tar.gz
risu: Include <sys/user.h> on ppc64
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> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Sandipan Das <sandipan@linux.ibm.com> Message-id: 20190607132521.9637-1-peter.maydell@linaro.org
-rw-r--r--risu_ppc64.c2
-rw-r--r--risu_reginfo_ppc64.c1
2 files changed, 3 insertions, 0 deletions
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"