Enable werror flag

This commit is contained in:
Pavel Zhukov 2018-04-12 13:10:19 +02:00
parent 7468f27022
commit be1fab1652
2 changed files with 20 additions and 2 deletions

12
radvd-werror.patch Normal file
View File

@ -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)
{

View File

@ -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 <pzhukov@redhat.com> - 2.17-11
- Enable Werror=all
* Mon Feb 19 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-10
- Add gcc BR