summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Günter2017-05-31 02:34:52 -0400
committerAdrian Günter2017-05-31 02:34:52 -0400
commitc8a30199265ab0896eab03bee4fc07e1cbe254e4 (patch)
tree0b12d971ddd46fc985232e88066b7f30d3bdde59
parentcf809aae1969476993e98d24a9b9a02b0ae7a09a (diff)
downloadaur-c8a30199265ab0896eab03bee4fc07e1cbe254e4.tar.gz
Fix GCC 7 Werrors (3.0-3)
-rw-r--r--PKGBUILD13
-rw-r--r--arpon-gcc7.patch41
2 files changed, 49 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 57830d6486c4..4e1c3f11937f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=arpon-ng
pkgver=3.0
-pkgrel=2
+pkgrel=3
pkgdesc="Prevents MITM attacks on the Address Resolution Protocol (ARP)"
arch=('i686' 'x86_64')
url="http://arpon.sourceforge.net"
@@ -16,14 +16,17 @@ install="${pkgname}.install"
source=("ArpON-${pkgver}-ng.tar.gz::https://sourceforge.net/projects/arpon/files/arpon/ArpON-${pkgver}-ng.tar.gz/download"
'arpon.service'
'arpon.service.conf'
- 'arpon-syslog.patch')
+ 'arpon-syslog.patch'
+ 'arpon-gcc7.patch')
md5sums=('a89ef9bc18e6f0fc9aa8a89aa676a281'
- 'SKIP'
- 'SKIP'
- 'SKIP')
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP')
prepare() {
cd "ArpON-${pkgver}-ng"
+ patch -p2 < ../arpon-gcc7.patch
patch -p1 < ../arpon-syslog.patch
sed -i -e 's:/sbin:/usr/bin:g' src/CMakeLists.txt README
mkdir -p build
diff --git a/arpon-gcc7.patch b/arpon-gcc7.patch
new file mode 100644
index 000000000000..e3e640e47883
--- /dev/null
+++ b/arpon-gcc7.patch
@@ -0,0 +1,41 @@
+diff --unified -r src/ArpON-3.0-ng/src/opt.c src-gcc7fix/ArpON-3.0-ng/src/opt.c
+--- src/ArpON-3.0-ng/src/opt.c 2016-01-28 20:56:19.000000000 -0500
++++ src-gcc7fix/ArpON-3.0-ng/src/opt.c 2017-05-31 02:22:54.053601192 -0400
+@@ -222,6 +222,8 @@
+ /* Print the version command option, cleanup and exit. */
+ std_version();
+ exit_cleanup(true);
++ /* Explicit break because exit_cleanup conditionally exits (noreturn unsuitable). */
++ break;
+
+ case 'h':
+ MSG_DEBUG("-h or --help command option");
+@@ -229,6 +231,8 @@
+ /* Print the help screen command option, cleanup and exit. */
+ std_help();
+ exit_cleanup(true);
++ /* Explicit break because exit_cleanup conditionally exits (noreturn unsuitable). */
++ break;
+
+ case '?':
+ case ':':
+@@ -285,7 +289,7 @@
+ }
+
+ /* Re-initialize the interface name command option to no interface? */
+- if (opt->interface != '\0')
++ if (opt->interface[0] != '\0')
+ memset(opt->interface, '\0', (size_t)IF_NAMESIZE);
+
+ /* Set the value of the interface name command option. */
+diff --unified -r src/ArpON-3.0-ng/src/sig.c src-gcc7fix/ArpON-3.0-ng/src/sig.c
+--- src/ArpON-3.0-ng/src/sig.c 2016-01-28 21:06:37.000000000 -0500
++++ src-gcc7fix/ArpON-3.0-ng/src/sig.c 2017-05-31 02:17:58.216940834 -0400
+@@ -204,6 +204,7 @@
+ case SIGINT:
+ /* Remove ^C symbol from the output terminal. */
+ printf("\r");
++ __attribute__ ((fallthrough));
+
+ case SIGTERM:
+ MSG_DEBUG("Caught %s (%d)..", SIG_ITOA(sig), sig);