diff mbox

Fix build on FreeBSD

Message ID 4F5247FB.40001@freebsd.org
State New
Headers show

Commit Message

Nathan Whitehorn March 3, 2012, 4:34 p.m. UTC
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

Comments

Blue Swirl March 17, 2012, 4:20 p.m. UTC | #1
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. UTC | #2
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
diff mbox

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