pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

triforce-afl: Update wip/triforce-afl to latest commit



Module Name:	pkgsrc-wip
Committed By:	akulpillai <vishnu%akulpillai.com@localhost>
Pushed By:	akulpillai
Date:		Thu May 30 15:45:27 2019 +0000
Changeset:	24444039577e46b8d42e00b79272bdfa66e4a5fc

Modified Files:
	triforce-afl/Makefile
	triforce-afl/distinfo
	triforce-afl/patches/patch-qemu__mode_build__qemu__support.sh
Added Files:
	triforce-afl/patches/patch-qemu__mode_qemu_Makefile
	triforce-afl/patches/patch-qemu__mode_qemu_audio_audio.c
	triforce-afl/patches/patch-qemu__mode_qemu_hw_display_omap__dss.c
	triforce-afl/patches/patch-qemu__mode_qemu_hw_net_etraxfs__eth.c
	triforce-afl/patches/patch-qemu__mode_qemu_hw_net_xilinx__axienet.c
	triforce-afl/patches/patch-qemu__mode_qemu_hw_ppc_mac__newworld.c
	triforce-afl/patches/patch-qemu__mode_qemu_hw_ppc_mac__oldworld.c
	triforce-afl/patches/patch-qemu__mode_qemu_memory.c
	triforce-afl/patches/patch-qemu__mode_qemu_slirp_tcp__subr.c
	triforce-afl/patches/patch-qemu__mode_qemu_tests_Makefile

Log Message:
triforce-afl: Update wip/triforce-afl to latest commit

Changes:
 * Update Makefile to standards
 * Add patches from qemu-2.3.0
 * Update build_qemu_support.sh patch

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=24444039577e46b8d42e00b79272bdfa66e4a5fc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 triforce-afl/Makefile                              | 15 ++++-----
 triforce-afl/distinfo                              | 20 +++++++++---
 .../patch-qemu__mode_build__qemu__support.sh       | 18 ++++++----
 .../patches/patch-qemu__mode_qemu_Makefile         | 26 +++++++++++++++
 .../patches/patch-qemu__mode_qemu_audio_audio.c    | 16 +++++++++
 .../patch-qemu__mode_qemu_hw_display_omap__dss.c   | 30 +++++++++++++++++
 .../patch-qemu__mode_qemu_hw_net_etraxfs__eth.c    | 25 ++++++++++++++
 .../patch-qemu__mode_qemu_hw_net_xilinx__axienet.c | 16 +++++++++
 .../patch-qemu__mode_qemu_hw_ppc_mac__newworld.c   | 38 ++++++++++++++++++++++
 .../patch-qemu__mode_qemu_hw_ppc_mac__oldworld.c   | 38 ++++++++++++++++++++++
 .../patches/patch-qemu__mode_qemu_memory.c         | 15 +++++++++
 .../patch-qemu__mode_qemu_slirp_tcp__subr.c        | 15 +++++++++
 .../patches/patch-qemu__mode_qemu_tests_Makefile   | 17 ++++++++++
 13 files changed, 269 insertions(+), 20 deletions(-)

diffs:
diff --git a/triforce-afl/Makefile b/triforce-afl/Makefile
index 89023d7304..b68a37998e 100644
--- a/triforce-afl/Makefile
+++ b/triforce-afl/Makefile
@@ -1,23 +1,22 @@
 # $NetBSD$
 
-DISTNAME=	${GIT_COMMIT}
+DISTNAME=	TriforceAFL
 PKGNAME=	TriforceAFL-0.0
 CATEGORIES=	emulators
-MASTER_SITES=	https://github.com/nccgroup/TriforceAFL/archive/
+MASTER_SITES=	${MASTER_SITE_GITHUB:=nccgroup/}
 
-GIT_COMMIT=	73ec279d5ee3aa84fd7e4e8c3818428d437d8fa7
+GITHUB_TAG=	2a8ed329233a921044c903222fc3aa029ef68c69
 
-MAINTAINER=	INSERT_YOUR_MAIL_ADDRESS_HERE
-HOMEPAGE=	https://github.com/nccgroup/
+MAINTAINER=	vishnu%akulpillai.com@localhost
+HOMEPAGE=	https://github.com/nccgroup/TriforceAFL/
 COMMENT=	AFL/QEMU fuzzing with full-system emulation
 LICENSE=	apache-2.0
 
 EXTRACT_USING=	gtar
-WRKSRC=		${WRKDIR}/TriforceAFL-${GIT_COMMIT}
+WRKSRC=		${WRKDIR}/TriforceAFL-${GITHUB_TAG}
 
-USE_TOOLS=	gmake pkg-config makeinfo perl:build
+USE_TOOLS=	bison gmake pkg-config makeinfo perl:build pkg-config
 
-# url2pkg-marker (please do not remove this line.)
 .include "../../lang/python/pyversion.mk"
 .include "../../devel/glib2/buildlink3.mk"
 .include "../../devel/ncurses/buildlink3.mk"
diff --git a/triforce-afl/distinfo b/triforce-afl/distinfo
index e04716a737..846cf5df79 100644
--- a/triforce-afl/distinfo
+++ b/triforce-afl/distinfo
@@ -1,7 +1,17 @@
 $NetBSD$
 
-SHA1 (73ec279d5ee3aa84fd7e4e8c3818428d437d8fa7.tar.gz) = 5228fa9167c63443baa9256d8d23459a10b7f47e
-RMD160 (73ec279d5ee3aa84fd7e4e8c3818428d437d8fa7.tar.gz) = 810d7ccc3dcbba1dc009ff6757a10a427f24af59
-SHA512 (73ec279d5ee3aa84fd7e4e8c3818428d437d8fa7.tar.gz) = a1670729a4f53451bc967c68c69e8632693c1f8bf1cb0f6d01fb1b810100786abf1a20dfe196696b5489623993c11188d82f4aa86fa1500f1a74f42e160bac3b
-Size (73ec279d5ee3aa84fd7e4e8c3818428d437d8fa7.tar.gz) = 30380242 bytes
-SHA1 (patch-qemu__mode_build__qemu__support.sh) = d05491b7c1e6ba20dd7a74880da6fb0b6c6ef346
+SHA1 (TriforceAFL-2a8ed329233a921044c903222fc3aa029ef68c69.tar.gz) = 9ab1432700070345ee61b4a8719e90b9756de131
+RMD160 (TriforceAFL-2a8ed329233a921044c903222fc3aa029ef68c69.tar.gz) = e4c34a542de1e6a5f6cad204fcea17858e7b6a34
+SHA512 (TriforceAFL-2a8ed329233a921044c903222fc3aa029ef68c69.tar.gz) = aac1abb5e9d334923a4d6dab159e518bce1944573884e1012620aff139d4d0abcdbca41104c1c2eed9006fc277321f1f13212a698a7b7c49c6b0f1f98078d2e0
+Size (TriforceAFL-2a8ed329233a921044c903222fc3aa029ef68c69.tar.gz) = 32045053 bytes
+SHA1 (patch-qemu__mode_build__qemu__support.sh) = ecb1dc079de08072e31d67d0d992d13cb343ca5a
+SHA1 (patch-qemu__mode_qemu_Makefile) = 8d8baa55e4f93ba635f9399c8e0a29f6f59d2292
+SHA1 (patch-qemu__mode_qemu_audio_audio.c) = aaa82ac3208ef605cb6f5b0fabd38a0d223f21f2
+SHA1 (patch-qemu__mode_qemu_hw_display_omap__dss.c) = 48f38ead6aa5a14b13f87e44217bb551817280ad
+SHA1 (patch-qemu__mode_qemu_hw_net_etraxfs__eth.c) = ceec571369f0f0a1f5b177f28a70a6d888ed67f2
+SHA1 (patch-qemu__mode_qemu_hw_net_xilinx__axienet.c) = 14106d36592b27beccf50f3844fc64fc5d591c1c
+SHA1 (patch-qemu__mode_qemu_hw_ppc_mac__newworld.c) = 51ecb00d8b0848277d6783eb3ee437665f6f963c
+SHA1 (patch-qemu__mode_qemu_hw_ppc_mac__oldworld.c) = 666b828a0060879503497c1405e2d2601d88bb5e
+SHA1 (patch-qemu__mode_qemu_memory.c) = 5f2de939254ea5d1b8acc76580205163edee471c
+SHA1 (patch-qemu__mode_qemu_slirp_tcp__subr.c) = 057d6e7b7af5ba9b3994f7944e797d0e1fd0c73b
+SHA1 (patch-qemu__mode_qemu_tests_Makefile) = c668c88991ccefdac8b0665113ea2c1a3d479ec5
diff --git a/triforce-afl/patches/patch-qemu__mode_build__qemu__support.sh b/triforce-afl/patches/patch-qemu__mode_build__qemu__support.sh
index 50447dd2e8..adf7b85a1d 100644
--- a/triforce-afl/patches/patch-qemu__mode_build__qemu__support.sh
+++ b/triforce-afl/patches/patch-qemu__mode_build__qemu__support.sh
@@ -1,18 +1,22 @@
 $NetBSD$
 
---- qemu_mode/build_qemu_support.sh.orig	2016-10-19 19:08:17.000000000 +0000
+Build qemu x86_64-bsd-user instead of linux user
+
+--- qemu_mode/build_qemu_support.sh.orig	2017-05-31 22:53:05.000000000 +0000
 +++ qemu_mode/build_qemu_support.sh
-@@ -7,10 +7,10 @@ CPU_TARGET=x86_64
+@@ -6,12 +6,12 @@
  cd qemu
  
  CFLAGS="-O3" ./configure --disable-werror \
 -  --enable-system --enable-linux-user \
 +  --enable-system --enable-bsd-user \
    --enable-guest-base --disable-gtk --disable-sdl --disable-vnc \
--  --target-list="${CPU_TARGET}-linux-user ${CPU_TARGET}-softmmu"
-+  --target-list="${CPU_TARGET}-bsd-user ${CPU_TARGET}-softmmu"
+-  --target-list="x86_64-linux-user x86_64-softmmu arm-softmmu aarch64-softmmu"
++  --target-list="x86_64-bsd-user x86_64-softmmu arm-softmmu aarch64-softmmu"
  
  make
--cp -f "${CPU_TARGET}-linux-user/qemu-${CPU_TARGET}" "../../afl-qemu-trace"
-+cp -f "${CPU_TARGET}-bsd-user/qemu-${CPU_TARGET}" "../../afl-qemu-trace"
- cp -f "${CPU_TARGET}-softmmu/qemu-system-${CPU_TARGET}" "../../afl-qemu-system-trace"
+-cp -f "x86_64-linux-user/qemu-x86_64" "../../afl-qemu-trace"
++cp -f "x86_64-bsd-user/qemu-x86_64" "../../afl-qemu-trace"
+ cp -f "x86_64-softmmu/qemu-system-x86_64" "../../afl-qemu-system-trace"
+ cp -f "x86_64-softmmu/qemu-system-x86_64" "../../qemu-system-x86_64"
+ cp -f "arm-softmmu/qemu-system-arm" "../../qemu-system-arm"
diff --git a/triforce-afl/patches/patch-qemu__mode_qemu_Makefile b/triforce-afl/patches/patch-qemu__mode_qemu_Makefile
new file mode 100644
index 0000000000..6e38142d23
--- /dev/null
+++ b/triforce-afl/patches/patch-qemu__mode_qemu_Makefile
@@ -0,0 +1,26 @@
+$NetBSD$
+
+Imported patch from qemu-2.3.0
+
+--- qemu_mode/qemu/Makefile.orig	2017-05-31 22:53:05.000000000 +0000
++++ qemu_mode/qemu/Makefile
+@@ -184,6 +184,7 @@ $(SRC_PATH)/pixman/configure:
+ DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt
+ DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS)
+ DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
++ARFLAGS=	-rcs
+ 
+ subdir-dtc:dtc/libfdt dtc/tests
+ 	$(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
+@@ -391,8 +392,9 @@ endif
+ install-confdir:
+ 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)"
+ 
+-install-sysconfig: install-datadir install-confdir
+-	$(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)"
++install-sysconfig:
++	$(INSTALL_DIR) "$(DESTDIR)$(egdir)"
++	$(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(egdir)"
+ 
+ install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \
+ install-datadir install-localstatedir
diff --git a/triforce-afl/patches/patch-qemu__mode_qemu_audio_audio.c b/triforce-afl/patches/patch-qemu__mode_qemu_audio_audio.c
new file mode 100644
index 0000000000..73d11ca1aa
--- /dev/null
+++ b/triforce-afl/patches/patch-qemu__mode_qemu_audio_audio.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
+(PR lib/43832: ssp causes common names to be defines)
+
+--- qemu_mode/qemu/audio/audio.c.orig	2017-05-31 22:53:05.000000000 +0000
++++ qemu_mode/qemu/audio/audio.c
+@@ -1173,7 +1173,7 @@ int AUD_read (SWVoiceIn *sw, void *buf, 
+         return 0;
+     }
+ 
+-    bytes = sw->hw->pcm_ops->read (sw, buf, size);
++    bytes = (*sw->hw->pcm_ops->read )(sw, buf, size);
+     return bytes;
+ }
+ 
diff --git a/triforce-afl/patches/patch-qemu__mode_qemu_hw_display_omap__dss.c b/triforce-afl/patches/patch-qemu__mode_qemu_hw_display_omap__dss.c
new file mode 100644
index 0000000000..64d8f7be41
--- /dev/null
+++ b/triforce-afl/patches/patch-qemu__mode_qemu_hw_display_omap__dss.c
@@ -0,0 +1,30 @@
+$NetBSD$
+
+Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
+(PR lib/43832: ssp causes common names to be defines)
+
+--- qemu_mode/qemu/hw/display/omap_dss.c.orig	2017-05-31 22:53:05.000000000 +0000
++++ qemu_mode/qemu/hw/display/omap_dss.c
+@@ -794,18 +794,18 @@ static void omap_rfbi_write(void *opaque
+         break;
+     case 0x58:	/* RFBI_READ */
+         if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0])
+-            s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 1);
++	    s->rfbi.rxbuf = (*s->rfbi.chip[0]->read)(s->rfbi.chip[0]->opaque, 1);
+         else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1])
+-            s->rfbi.rxbuf = s->rfbi.chip[1]->read(s->rfbi.chip[1]->opaque, 1);
++	    s->rfbi.rxbuf = (*s->rfbi.chip[1]->read)(s->rfbi.chip[1]->opaque, 1);
+         if (!-- s->rfbi.pixels)
+             omap_rfbi_transfer_stop(s);
+         break;
+ 
+     case 0x5c:	/* RFBI_STATUS */
+         if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0])
+-            s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 0);
++	    s->rfbi.rxbuf = (*s->rfbi.chip[0]->read)(s->rfbi.chip[0]->opaque, 0);
+         else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1])
+-            s->rfbi.rxbuf = s->rfbi.chip[1]->read(s->rfbi.chip[1]->opaque, 0);
++	    s->rfbi.rxbuf = (*s->rfbi.chip[1]->read)(s->rfbi.chip[1]->opaque, 0);
+         if (!-- s->rfbi.pixels)
+             omap_rfbi_transfer_stop(s);
+         break;
diff --git a/triforce-afl/patches/patch-qemu__mode_qemu_hw_net_etraxfs__eth.c b/triforce-afl/patches/patch-qemu__mode_qemu_hw_net_etraxfs__eth.c
new file mode 100644
index 0000000000..030aea95e4
--- /dev/null
+++ b/triforce-afl/patches/patch-qemu__mode_qemu_hw_net_etraxfs__eth.c
@@ -0,0 +1,25 @@
+$NetBSD$
+
+Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
+(PR lib/43832: ssp causes common names to be defines)
+
+--- qemu_mode/qemu/hw/net/etraxfs_eth.c.orig	2017-05-31 22:53:05.000000000 +0000
++++ qemu_mode/qemu/hw/net/etraxfs_eth.c
+@@ -185,7 +185,7 @@ static void mdio_read_req(struct qemu_md
+ 
+     phy = bus->devs[bus->addr];
+     if (phy && phy->read) {
+-        bus->data = phy->read(phy, bus->req);
++	bus->data = (*phy->read)(phy, bus->req);
+     } else {
+         bus->data = 0xffff;
+     }
+@@ -364,7 +364,7 @@ static void eth_validate_duplex(ETRAXFSE
+     int new_mm = 0;
+ 
+     phy = eth->mdio_bus.devs[eth->phyaddr];
+-    phy_duplex = !!(phy->read(phy, 18) & (1 << 11));
++    phy_duplex = !!((*phy->read)(phy, 18) & (1 << 11));
+     mac_duplex = !!(eth->regs[RW_REC_CTRL] & 128);
+ 
+     if (mac_duplex != phy_duplex) {
diff --git a/triforce-afl/patches/patch-qemu__mode_qemu_hw_net_xilinx__axienet.c b/triforce-afl/patches/patch-qemu__mode_qemu_hw_net_xilinx__axienet.c
new file mode 100644
index 0000000000..73d5c7053b
--- /dev/null
+++ b/triforce-afl/patches/patch-qemu__mode_qemu_hw_net_xilinx__axienet.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
+(PR lib/43832: ssp causes common names to be defines)
+
+--- qemu_mode/qemu/hw/net/xilinx_axienet.c.orig	2017-05-31 22:53:05.000000000 +0000
++++ qemu_mode/qemu/hw/net/xilinx_axienet.c
+@@ -210,7 +210,7 @@ static uint16_t mdio_read_req(struct MDI
+ 
+     phy = bus->devs[addr];
+     if (phy && phy->read) {
+-        data = phy->read(phy, reg);
++        data = (*phy->read)(phy, reg);
+     } else {
+         data = 0xffff;
+     }
diff --git a/triforce-afl/patches/patch-qemu__mode_qemu_hw_ppc_mac__newworld.c b/triforce-afl/patches/patch-qemu__mode_qemu_hw_ppc_mac__newworld.c
new file mode 100644
index 0000000000..50108caa28
--- /dev/null
+++ b/triforce-afl/patches/patch-qemu__mode_qemu_hw_ppc_mac__newworld.c
@@ -0,0 +1,38 @@
+$NetBSD$
+
+Avoid conflicts with round_page() macro in DragonFly's <cpu/param.h>
+
+--- qemu_mode/qemu/hw/ppc/mac_newworld.c.orig	2017-05-31 22:53:05.000000000 +0000
++++ qemu_mode/qemu/hw/ppc/mac_newworld.c
+@@ -127,7 +127,7 @@ static uint64_t translate_kernel_address
+     return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
+ }
+ 
+-static hwaddr round_page(hwaddr addr)
++static hwaddr round_pageq(hwaddr addr)
+ {
+     return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
+ }
+@@ -257,7 +257,7 @@ static void ppc_core99_init(MachineState
+         }
+         /* load initrd */
+         if (initrd_filename) {
+-            initrd_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
++            initrd_base = round_pageq(kernel_base + kernel_size + KERNEL_GAP);
+             initrd_size = load_image_targphys(initrd_filename, initrd_base,
+                                               ram_size - initrd_base);
+             if (initrd_size < 0) {
+@@ -265,11 +265,11 @@ static void ppc_core99_init(MachineState
+                          initrd_filename);
+                 exit(1);
+             }
+-            cmdline_base = round_page(initrd_base + initrd_size);
++            cmdline_base = round_pageq(initrd_base + initrd_size);
+         } else {
+             initrd_base = 0;
+             initrd_size = 0;
+-            cmdline_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
++            cmdline_base = round_pageq(kernel_base + kernel_size + KERNEL_GAP);
+         }
+         ppc_boot_device = 'm';
+     } else {
diff --git a/triforce-afl/patches/patch-qemu__mode_qemu_hw_ppc_mac__oldworld.c b/triforce-afl/patches/patch-qemu__mode_qemu_hw_ppc_mac__oldworld.c
new file mode 100644
index 0000000000..9406081b54
--- /dev/null
+++ b/triforce-afl/patches/patch-qemu__mode_qemu_hw_ppc_mac__oldworld.c
@@ -0,0 +1,38 @@
+$NetBSD$
+
+Avoid conflicts with round_page() macro in DragonFly's <cpu/param.h>
+
+--- qemu_mode/qemu/hw/ppc/mac_oldworld.c.orig	2017-05-31 22:53:05.000000000 +0000
++++ qemu_mode/qemu/hw/ppc/mac_oldworld.c
+@@ -60,7 +60,7 @@ static uint64_t translate_kernel_address
+     return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
+ }
+ 
+-static hwaddr round_page(hwaddr addr)
++static hwaddr round_pageq(hwaddr addr)
+ {
+     return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
+ }
+@@ -185,7 +185,7 @@ static void ppc_heathrow_init(MachineSta
+         }
+         /* load initrd */
+         if (initrd_filename) {
+-            initrd_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
++            initrd_base = round_pageq(kernel_base + kernel_size + KERNEL_GAP);
+             initrd_size = load_image_targphys(initrd_filename, initrd_base,
+                                               ram_size - initrd_base);
+             if (initrd_size < 0) {
+@@ -193,11 +193,11 @@ static void ppc_heathrow_init(MachineSta
+                          initrd_filename);
+                 exit(1);
+             }
+-            cmdline_base = round_page(initrd_base + initrd_size);
++            cmdline_base = round_pageq(initrd_base + initrd_size);
+         } else {
+             initrd_base = 0;
+             initrd_size = 0;
+-            cmdline_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
++            cmdline_base = round_pageq(kernel_base + kernel_size + KERNEL_GAP);
+         }
+         ppc_boot_device = 'm';
+     } else {
diff --git a/triforce-afl/patches/patch-qemu__mode_qemu_memory.c b/triforce-afl/patches/patch-qemu__mode_qemu_memory.c
new file mode 100644
index 0000000000..e3c0b775a1
--- /dev/null
+++ b/triforce-afl/patches/patch-qemu__mode_qemu_memory.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Imported patch from qemu-2.3.0
+
+--- qemu_mode/qemu/memory.c.orig	2017-05-31 22:53:05.000000000 +0000
++++ qemu_mode/qemu/memory.c
+@@ -394,7 +394,7 @@ static void memory_region_read_accessor(
+     if (mr->flush_coalesced_mmio) {
+         qemu_flush_coalesced_mmio_buffer();
+     }
+-    tmp = mr->ops->read(mr->opaque, addr, size);
++    tmp = (*mr->ops->read)(mr->opaque, addr, size);
+     trace_memory_region_ops_read(mr, addr, tmp, size);
+     *value |= (tmp & mask) << shift;
+ }
diff --git a/triforce-afl/patches/patch-qemu__mode_qemu_slirp_tcp__subr.c b/triforce-afl/patches/patch-qemu__mode_qemu_slirp_tcp__subr.c
new file mode 100644
index 0000000000..0daf28f2b2
--- /dev/null
+++ b/triforce-afl/patches/patch-qemu__mode_qemu_slirp_tcp__subr.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Imported patch from qemu-2.3.0
+
+--- qemu_mode/qemu/slirp/tcp_subr.c.orig	2017-05-31 22:53:05.000000000 +0000
++++ qemu_mode/qemu/slirp/tcp_subr.c
+@@ -340,6 +340,8 @@ int tcp_fconnect(struct socket *so)
+     socket_set_fast_reuse(s);
+     opt = 1;
+     qemu_setsockopt(s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(opt));
++    opt = 1;
++    qemu_setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt));
+ 
+     addr.sin_family = AF_INET;
+     if ((so->so_faddr.s_addr & slirp->vnetwork_mask.s_addr) ==
diff --git a/triforce-afl/patches/patch-qemu__mode_qemu_tests_Makefile b/triforce-afl/patches/patch-qemu__mode_qemu_tests_Makefile
new file mode 100644
index 0000000000..a8c6d32341
--- /dev/null
+++ b/triforce-afl/patches/patch-qemu__mode_qemu_tests_Makefile
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Don't link -lutil on SunOS
+
+--- qemu_mode/qemu/tests/Makefile.orig	2017-05-31 22:53:05.000000000 +0000
++++ qemu_mode/qemu/tests/Makefile
+@@ -371,8 +371,10 @@ tests/test-qemu-opts$(EXESUF): tests/tes
+ tests/test-write-threshold$(EXESUF): tests/test-write-threshold.o $(block-obj-y) libqemuutil.a libqemustub.a
+ 
+ ifeq ($(CONFIG_POSIX),y)
++ifneq ($(CONFIG_SOLARIS),y)
+ LIBS += -lutil
+ endif
++endif
+ 
+ # QTest rules
+ 


Home | Main Index | Thread Index | Old Index