From 07c187eac7ff0bf24d0578bcbd1983c8bc492749 Mon Sep 17 00:00:00 2001 From: Filipe Rosset Date: Apr 11 2018 23:53:02 +0000 Subject: - added patch to build with gcc7 fixes rhbz #1555446 --- diff --git a/ArpON-gcc-7-fixes.patch b/ArpON-gcc-7-fixes.patch new file mode 100644 index 0000000..3cfee91 --- /dev/null +++ b/ArpON-gcc-7-fixes.patch @@ -0,0 +1,47 @@ +Description: Fix gcc-7 compile errors + * Fix comparison between pointer and zero character constant. + * Fix implicit fallthrough by adding a break (though the break will never be + reached since exit is called anyways). + * Add fallthrough comment where fallthrough is intentional. Gcc parses this + comment and recognizes the fallthrough as intentional. +Author: Lukas Schwaighofer + +--- a/src/opt.c ++++ b/src/opt.c +@@ -222,6 +222,7 @@ + /* Print the version command option, cleanup and exit. */ + std_version(); + exit_cleanup(true); ++ break; + + case 'h': + MSG_DEBUG("-h or --help command option"); +@@ -229,6 +230,7 @@ + /* Print the help screen command option, cleanup and exit. */ + std_help(); + exit_cleanup(true); ++ break; + + case '?': + case ':': +@@ -285,8 +287,8 @@ + } + + /* Re-initialize the interface name command option to no interface? */ +- if (opt->interface != '\0') +- memset(opt->interface, '\0', (size_t)IF_NAMESIZE); ++ if (opt->interface != NULL) ++ memset(opt->interface, 0, (size_t)IF_NAMESIZE); + + /* Set the value of the interface name command option. */ + memcpy(opt->interface, interface, len); +--- a/src/sig.c ++++ b/src/sig.c +@@ -204,6 +204,7 @@ + case SIGINT: + /* Remove ^C symbol from the output terminal. */ + printf("\r"); ++ /* FALLTHRU */ + + case SIGTERM: + MSG_DEBUG("Caught %s (%d)..", SIG_ITOA(sig), sig); diff --git a/ArpON.spec b/ArpON.spec index 1bc829b..24e6054 100644 --- a/ArpON.spec +++ b/ArpON.spec @@ -1,11 +1,12 @@ Name: ArpON Version: 3.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: ARP handler inspection License: BSD URL: http://arpon.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/arpon/arpon/ArpON-%{version}/ArpON-%{version}-ng.tar.gz +Patch1: ArpON-gcc-7-fixes.patch BuildRequires: gcc BuildRequires: libpcap-devel @@ -21,10 +22,12 @@ attack. %prep %setup -q -n %{name}-%{version}-ng +%patch1 -p1 %build %cmake . -%{__make} %{?_smp_mflags} +%make_build + %install %{__install} -D -pm 755 src/arpon %{buildroot}%{_sbindir}/arpon @@ -37,6 +40,9 @@ attack. %{_mandir}/man8/arpon.8* %changelog +* Wed Apr 11 2018 Filipe Rosset - 3.0-8 +- added patch to build with gcc7 fixes rhbz #1555446 + * Tue Mar 06 2018 Fabian Affolter - 3.0-7 - Fix BR