risu: Include <sys/user.h> on ppc64
PATCH 1/1 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.
---
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(+)
risu_ppc64.c +2 -0
@@ -11,6 +11,8 @@* based on Peter Maydell's risu_arm.c *****************************************************************************/ +#include <sys/user.h> +#include "risu.h" void advance_pc (void *vuc)
risu_reginfo_ppc64.c +1 -0
@@ -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"
Signature · 1 line
2.20.1
Quoted 6 lines · Peter Maydell
To build the C parts of risu for ppc64le with recent glibc/kernel headers, we need to include
sys/user.hto avoid a compile error, becausesys/ucontext.hdefines a struct which includes a pointer to 'structpt_regs' but does not provide a definition of that struct.Signed-off-by Peter Maydell <[email protected]>
Quoted 26 lines
---
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(+)risu_ppc64.c +2
-0@@ -11,6 +11,8 @@* based on Peter Maydell's risu_arm.c *****************************************************************************/ +#include <sys/user.h> +#include "risu.h" void advance_pc (void *vuc)risu_reginfo_ppc64.c +0
-0
risu_reginfo_ppc64.c line 22
Quoted 7 lines
risu_reginfo_ppc64.c +1
-0@@ -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"
--
Alex Bennée
Quoted 6 lines · Peter Maydell
To build the C parts of risu for ppc64le with recent glibc/kernel headers, we need to include
sys/user.hto avoid a compile error, becausesys/ucontext.hdefines a struct which includes a pointer to 'structpt_regs' but does not provide a definition of that struct.Signed-off-by Peter Maydell <[email protected]>
LGTM.
Quoted 34 lines
---
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(+)risu_ppc64.c +2
-0@@ -11,6 +11,8 @@* based on Peter Maydell's risu_arm.c *****************************************************************************/ +#include <sys/user.h> +#include "risu.h" void advance_pc (void *vuc)risu_reginfo_ppc64.c +1
-0@@ -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"
Quoted 9 lines · Sandipan Das
Quoted 5 lines · Peter Maydell
To build the C parts of risu for ppc64le with recent glibc/kernel headers, we need to include
sys/user.hto avoid a compile error, becausesys/ucontext.hdefines a struct which includes a pointer to 'structpt_regs' but does not provide a definition of that struct.
Quoted 5 lines
Quoted 1 line
Signed-off-by Peter Maydell <[email protected]>LGTM.
Reviewed-by Sandipan Das <[email protected]>
Thanks; pushed to risu master.
-- PMM