Fix build on FreeBSD
PATCH 1/1 Fix build on FreeBSD
Add some includes required to build qemu on FreeBSD.
--- bsd-user/syscall.c | 2 ++ iohandler.c | 1 + os-posix.c | 4 ++++ 3 files changed, 7 insertions(+), 0 deletions(-)
bsd-user/syscall.c +0 -0
@@ -212,9 +212,11 @@ static int sysctl_oldcvt(void *holdp, size_t holdlen, uint3
2_t kind)
*(uint64_t *)holdp = tswap64(*(unsigned long *)holdp);
break;
#endif
+#ifdef CTLTYPE_QUAD
case CTLTYPE_QUAD:
*(uint64_t *)holdp = tswap64(*(uint64_t *)holdp);
break;
+#endif
case CTLTYPE_STRING:
break;
default:iohandler.c +1 -0
@@ -29,6 +29,7 @@#ifndef _WIN32#include <sys/wait.h> +#include <signal.h> #endif typedef struct IOHandlerRecord {
os-posix.c +4 -0
@@ -44,6 +44,10 @@#include <sys/syscall.h> #endif +#ifdef CONFIG_BSD +#include <sys/sysctl.h> +#endif +#ifdef CONFIG_EVENTFD #include <sys/eventfd.h> #endif
Am 31.05.2011 um 16:57 schrieb Nathan Whitehorn:
Quoted 1 line
Add some includes required to build qemu on FreeBSD.
Missing Sob.
Quoted 5 lines
---
bsd-user/syscall.c | 2 ++ iohandler.c | 1 + os-posix.c | 4 ++++ 3 files changed, 7 insertions(+), 0 deletions(-)
[...]
iohandler.c line 35
Quoted 12 lines
iohandler.c +1
-0@@ -29,6 +29,7 @@#ifndef _WIN32#include <sys/wait.h> +#include <signal.h> #endif typedef struct IOHandlerRecord {
This is independent of the other BSD issues (that I cannot judge) and affects Darwin and Haiku as well. Did you check that with your patch Win32 does not need the header?
Alexandre (cc'ed) posted a slightly different patch, adding it in qemu-common.h instead.
Andreas
Quoted 5 lines · Andreas Färber
Am 31.05.2011 um 16:57 schrieb Nathan Whitehorn:
Quoted 1 line
Add some includes required to build qemu on FreeBSD.
Missing Sob.
Oops, I'll resubmit.
Quoted 17 lines
Quoted 5 lines
---
bsd-user/syscall.c | 2 ++ iohandler.c | 1 + os-posix.c | 4 ++++ 3 files changed, 7 insertions(+), 0 deletions(-)[...]
Quoted 11 lines
iohandler.c +1
-0@@ -29,6 +29,7 @@#ifndef _WIN32#include <sys/wait.h> +#include <signal.h> #endif
Quoted 5 lines
iohandler.c line 35
Quoted 1 line
iohandler.c +0
-0typedef struct IOHandlerRecord {This is independent of the other BSD issues (that I cannot judge) and affects Darwin and Haiku as well. Did you check that with your patch Win32 does not need the header?
Alexandre (cc'ed) posted a slightly different patch, adding it in
qemu-common.hinstead.
Ah, that's fine then. I have no idea about Win32, I just know it won't compile on FreeBSD without it, since it hasn't been included yet as a side effect. -Nathan
Hi Nathan,
Quoted 37 lines · Nathan Whitehorn
Quoted 6 lines · Andreas Färber
Am 31.05.2011 um 16:57 schrieb Nathan Whitehorn:
Quoted 1 line
Add some includes required to build qemu on FreeBSD.
Missing Sob.
Oops, I'll resubmit.
Quoted 27 lines
Quoted 5 lines
---
bsd-user/syscall.c| 2 ++iohandler.c| 1 +os-posix.c| 4 ++++3 files changed, 7 insertions(+), 0 deletions(-)[...]
iohandler.c line 35
Quoted 13 lines
iohandler.c +1
-0@@ -29,6 +29,7 @@#ifndef _WIN32#include <sys/wait.h> +#include <signal.h> #endif typedef struct IOHandlerRecord {This is independent of the other BSD issues (that I cannot judge) and affects Darwin and Haiku as well. Did you check that with your patch Win32 does not need the header?
Alexandre (cc'ed) posted a slightly different patch, adding it in
qemu-common.hinstead.
Normally, the following patch should solve this particular missing header. It's already been added to the trivial patches queue by Stefan.
http://patchwork.ozlabs.org/patch/98325/
Alexandre