diff options
author | Juergen Lock <nox@FreeBSD.org> | 2014-11-29 15:19:08 +0000 |
---|---|---|
committer | Juergen Lock <nox@FreeBSD.org> | 2014-11-29 15:19:08 +0000 |
commit | 479b4da944fe378b731c61b764668b2f85973e46 (patch) | |
tree | d57d16cbaf01b49ac6b8a7cd2dc9e7652c71cbce /emulators/qemu-devel | |
parent | a1b0d459ed676e0be550ef8a38e1537a45473347 (diff) |
Notes
Diffstat (limited to 'emulators/qemu-devel')
-rw-r--r-- | emulators/qemu-devel/Makefile | 3 | ||||
-rw-r--r-- | emulators/qemu-devel/files/extra-patch-8267ad2cb92b106bb16e91234f04abc49ab32036 | 33 |
2 files changed, 35 insertions, 1 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile index 83fd92b8f59f..b755c581fc93 100644 --- a/emulators/qemu-devel/Makefile +++ b/emulators/qemu-devel/Makefile @@ -3,7 +3,7 @@ PORTNAME= qemu PORTVERSION= 2.0.2 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= emulators MASTER_SITES= http://wiki.qemu.org/download/:release \ LOCAL/nox:snapshot @@ -98,6 +98,7 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch-9ed0e07e2e07791858339874eb4d20daca858c8a EXTRA_PATCHES+= ${FILESDIR}/extra-patch-a8dc4de7f73bc6f8363c0fc81c4c6e53733c444b EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bsd-user-freebsd-os-socket.h EXTRA_PATCHES+= ${FILESDIR}/extra-patch-cab0d36ffd4e70b1879dc2cf860c975a7965afc3 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-8267ad2cb92b106bb16e91234f04abc49ab32036 .endif CONFIGURE_ARGS+= --localstatedir=/var diff --git a/emulators/qemu-devel/files/extra-patch-8267ad2cb92b106bb16e91234f04abc49ab32036 b/emulators/qemu-devel/files/extra-patch-8267ad2cb92b106bb16e91234f04abc49ab32036 new file mode 100644 index 000000000000..ea3a4b5143ba --- /dev/null +++ b/emulators/qemu-devel/files/extra-patch-8267ad2cb92b106bb16e91234f04abc49ab32036 @@ -0,0 +1,33 @@ +From 8267ad2cb92b106bb16e91234f04abc49ab32036 Mon Sep 17 00:00:00 2001 +From: Stacey Son <sson@FreeBSD.org> +Date: Wed, 26 Nov 2014 21:07:00 +0000 +Subject: [PATCH] Bug fix for hw.machine and hw.machine_arch sysctl's. + +For a NULL buffer sysctl needs to return just the length of the buffer. +--- + bsd-user/freebsd/os-sys.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/bsd-user/freebsd/os-sys.c b/bsd-user/freebsd/os-sys.c +index 3ab4f8e..dbdc9ef 100644 +--- a/bsd-user/freebsd/os-sys.c ++++ b/bsd-user/freebsd/os-sys.c +@@ -336,12 +336,16 @@ abi_long do_freebsd_sysctl(CPUArchState *env, abi_ulong namep, int32_t namelen, + case CTL_HW: + switch (snamep[1]) { + case HW_MACHINE: +- strlcpy(holdp, TARGET_HW_MACHINE, oldlen); ++ holdlen = sizeof(TARGET_HW_MACHINE); ++ if (holdp) ++ strlcpy(holdp, TARGET_HW_MACHINE, oldlen); + ret = 0; + goto out; + + case HW_MACHINE_ARCH: +- strlcpy(holdp, TARGET_HW_MACHINE_ARCH, oldlen); ++ holdlen = sizeof(TARGET_HW_MACHINE_ARCH); ++ if (holdp) ++ strlcpy(holdp, TARGET_HW_MACHINE_ARCH, oldlen); + ret = 0; + goto out; + |