aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2017-02-02 17:39:25 +0800
committerjbeich <jbeich@FreeBSD.org>2017-02-02 17:39:25 +0800
commit065c426584b2ae68e17d434c5b16e22f62e350fd (patch)
tree591f3564f426bed77010adfc8fa09a1f69c922cc
parent28e5a0e365028d58a02cea589c9d0978612f6ca0 (diff)
downloadfreebsd-ports-gnome-065c426584b2ae68e17d434c5b16e22f62e350fd.tar.gz
freebsd-ports-gnome-065c426584b2ae68e17d434c5b16e22f62e350fd.tar.zst
freebsd-ports-gnome-065c426584b2ae68e17d434c5b16e22f62e350fd.zip
emulators/mame: unbreak with clang 4.0
../../../../../src/emu/webengine.c:333:21: error: ordered comparison between pointer and zero ('int *' and 'int') if ((&data_length > 0) && (sizeof(file_name) > 0)) ~~~~~~~~~~~~ ^ ~ Reported by: antoine (via exp-run)
-rw-r--r--emulators/mame/Makefile2
-rw-r--r--emulators/mame/files/patch-src_emu_webengine.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/emulators/mame/Makefile b/emulators/mame/Makefile
index d9d391afeb81..2102bec014dd 100644
--- a/emulators/mame/Makefile
+++ b/emulators/mame/Makefile
@@ -3,7 +3,7 @@
PORTNAME?= mame
PORTVERSION= 0.166
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES= emulators
MAINTAINER= ports@FreeBSD.org
diff --git a/emulators/mame/files/patch-src_emu_webengine.c b/emulators/mame/files/patch-src_emu_webengine.c
new file mode 100644
index 000000000000..0c9e5d9f66b1
--- /dev/null
+++ b/emulators/mame/files/patch-src_emu_webengine.c
@@ -0,0 +1,11 @@
+--- src/emu/webengine.c.orig 2015-09-30 06:29:01 UTC
++++ src/emu/webengine.c
+@@ -330,7 +330,7 @@ int web_engine::begin_request_handler(st
+ // That upload_data contains more than we need. It also has the headers.
+ // We'll need to strip it down to just what we want.
+
+- if ((&data_length > 0) && (sizeof(file_name) > 0))
++ if ((data_length > 0) && (sizeof(file_name) > 0))
+ {
+ // MSVC doesn't yet support variable-length arrays, so chop the string the old-fashioned way
+ upload_data[data_length] = '\0';