diff mbox

Fix FreeBSD (10.x) build after 7dc9ae43

Message ID 1479778365-11315-1-git-send-email-emaste@freebsd.org (mailing list archive)
State New, archived
Headers show

Commit Message

Ed Maste Nov. 22, 2016, 1:32 a.m. UTC
Include sys/user.h for declaration of 'struct kinfo_proc'.
Add -lutil to qemu-ga link for kinfo_getproc.

Signed-off-by: Ed Maste <emaste@freebsd.org>
---
 configure          | 2 ++
 util/oslib-posix.c | 1 +
 2 files changed, 3 insertions(+)

Comments

Stefan Hajnoczi Nov. 22, 2016, 10:57 a.m. UTC | #1
On Mon, Nov 21, 2016 at 08:32:45PM -0500, Ed Maste wrote:
> Include sys/user.h for declaration of 'struct kinfo_proc'.
> Add -lutil to qemu-ga link for kinfo_getproc.
> 
> Signed-off-by: Ed Maste <emaste@freebsd.org>
> ---
>  configure          | 2 ++
>  util/oslib-posix.c | 1 +
>  2 files changed, 3 insertions(+)

Thanks, this looks relevant for QEMU 2.8-rc1 so I applied it to my
staging tree:
https://github.com/stefanha/qemu/commits/staging

Stefan
diff mbox

Patch

diff --git a/configure b/configure
index 7d2a34e..5e66828 100755
--- a/configure
+++ b/configure
@@ -582,6 +582,8 @@  FreeBSD)
   audio_possible_drivers="oss sdl pa"
   # needed for kinfo_getvmmap(3) in libutil.h
   LIBS="-lutil $LIBS"
+  # needed for kinfo_getproc
+  libs_qga="-lutil $libs_qga"
   netmap=""  # enable netmap autodetect
   HOST_VARIANT_DIR="freebsd"
 ;;
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 67c6589..f631464 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -45,6 +45,7 @@ 
 
 #ifdef __FreeBSD__
 #include <sys/sysctl.h>
+#include <sys/user.h>
 #include <libutil.h>
 #endif