Patchwork Fix build on FreeBSD

login
register
mail settings
Submitter Nathan Whitehorn
Date March 3, 2012, 4:34 p.m.
Message ID <4F5247FB.40001@freebsd.org>
Download mbox | patch
Permalink /patch/144447/
State New
Headers show

Comments

Nathan Whitehorn - March 3, 2012, 4:34 p.m.
Fix a missing header required to build on recent FreeBSD.

Signed-off-by: Nathan Whitehorn <nwhitehorn@freebsd.org>
---
  os-posix.c |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)

--
1.7.9
Blue Swirl - March 17, 2012, 4:20 p.m.
On Sat, Mar 3, 2012 at 16:34, Nathan Whitehorn <nwhitehorn@freebsd.org> wrote:
> Fix a missing header required to build on recent FreeBSD.
>
> Signed-off-by: Nathan Whitehorn <nwhitehorn@freebsd.org>
> ---
>  os-posix.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/os-posix.c b/os-posix.c
> index dbf3b24..83b14a0 100644
> --- a/os-posix.c
> +++ b/os-posix.c
> @@ -45,6 +45,10 @@
>  #include <sys/syscall.h>
>  #endif

These and the below CONFIG_EVENTFD stuff does not exist in QEMU git
head. Please rebase.

>
> +#ifdef __FreeBSD__
> +#include <sys/sysctl.h>
> +#endif
> +
>  #ifdef CONFIG_EVENTFD
>  #include <sys/eventfd.h>
>  #endif
> --
> 1.7.9
>
>
Nathan Whitehorn - March 17, 2012, 9:55 p.m.
On Mar 17, 2012, at 11:20 AM, Blue Swirl wrote:

> On Sat, Mar 3, 2012 at 16:34, Nathan Whitehorn  
> <nwhitehorn@freebsd.org> wrote:
>> Fix a missing header required to build on recent FreeBSD.
>>
>> Signed-off-by: Nathan Whitehorn <nwhitehorn@freebsd.org>
>> ---
>>  os-posix.c |    4 ++++
>>  1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/os-posix.c b/os-posix.c
>> index dbf3b24..83b14a0 100644
>> --- a/os-posix.c
>> +++ b/os-posix.c
>> @@ -45,6 +45,10 @@
>>  #include <sys/syscall.h>
>>  #endif
>
> These and the below CONFIG_EVENTFD stuff does not exist in QEMU git
> head. Please rebase.

Thanks, I'll prepare a new patch. Incidentally, the build has also  
been broken by the addition of qmp_guest_network_get_interfaces(),  
which depends on the Linux-only ioctl SIOCGIFHWADDR.
-Nathan

Patch

diff --git a/os-posix.c b/os-posix.c
index dbf3b24..83b14a0 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -45,6 +45,10 @@ 
  #include <sys/syscall.h>
  #endif

+#ifdef __FreeBSD__
+#include <sys/sysctl.h>
+#endif
+
  #ifdef CONFIG_EVENTFD
  #include <sys/eventfd.h>
  #endif