diff --git a/radvd-werror.patch b/radvd-werror.patch new file mode 100644 index 0000000..e2a792c --- /dev/null +++ b/radvd-werror.patch @@ -0,0 +1,12 @@ +diff --git a/gram.y b/gram.y +index 1c74c9d..b1d675c 100644 +--- a/gram.y ++++ b/gram.y +@@ -408,7 +408,6 @@ v6addrlist_rasrcaddress : IPV6ADDR ';' + prefixdef : prefixhead optional_prefixplist ';' + { + if (prefix) { +- unsigned int dst; + + if (prefix->AdvPreferredLifetime > prefix->AdvValidLifetime) + { diff --git a/radvd.spec b/radvd.spec index eef9336..32aaca3 100644 --- a/radvd.spec +++ b/radvd.spec @@ -1,7 +1,7 @@ Summary: A Router Advertisement daemon Name: radvd Version: 2.17 -Release: 10%{?dist} +Release: 11%{?dist} # The code includes the advertising clause, so it's GPL-incompatible License: BSD with advertising Group: System Environment/Daemons @@ -9,6 +9,8 @@ URL: http://www.litech.org/radvd/ Source0: %{url}dist/%{name}-%{version}.tar.xz Source1: radvd-tmpfs.conf Source2: radvd.service +## https://github.com/reubenhwk/radvd/commit/6e45acbf3d64b9bd945adcb3de622fd7d059ceb9.patch +Patch0: radvd-werror.patch BuildRequires: gcc BuildRequires: bison @@ -33,6 +35,7 @@ services. %prep %setup -q +%patch0 -p1 -b .werror for F in CHANGES; do iconv -f iso-8859-1 -t utf-8 < "$F" > "${F}.new" @@ -41,7 +44,7 @@ for F in CHANGES; do done %build -export CFLAGS="$RPM_OPT_FLAGS -fPIE" +export CFLAGS="$RPM_OPT_FLAGS -fPIE -Werror=all" export LDFLAGS='-pie -Wl,-z,relro,-z,now,-z,noexecstack,-z,nodlopen' %configure \ --disable-silent-rules \ @@ -95,6 +98,9 @@ exit 0 %{_sbindir}/radvdump %changelog +* Thu Apr 12 2018 Pavel Zhukov - 2.17-11 +- Enable Werror=all + * Mon Feb 19 2018 Pavel Zhukov - 2.17-10 - Add gcc BR