diff --git a/disable-werror.patch b/disable-werror.patch new file mode 100644 index 0000000..48ffc45 --- /dev/null +++ b/disable-werror.patch @@ -0,0 +1,24 @@ +diff --git a/Makefile.am b/Makefile.am +index 292c0fd..b20574c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -19,7 +19,7 @@ ACLOCAL_AMFLAGS = -I m4 + parse_cli.o: CFLAGS+=-U_FORTIFY_SOURCE -Wno-error + + ## system requires a shared libconfig +-AM_CFLAGS = -Wall -Werror -Wextra -Wformat=2 $(LIBCONFIG_CFLAGS) $(LIBNL_CFLAGS) ++AM_CFLAGS = -Wall -Wextra -Wformat=2 $(LIBCONFIG_CFLAGS) $(LIBNL_CFLAGS) + AM_LDFLAGS = $(LIBCONFIG_LIBS) $(LIBNL_LIBS) -lrt + + ## header files to be installed, for programs using the client interface to lldpad +diff --git a/configure.ac b/configure.ac +index 0667446..e49867e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,5 +1,5 @@ + AC_INIT([lldpad], [1.0.1], [lldp-devel@open-lldp.org]) +-AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) ++AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) + + m4_pattern_allow([AM_PROG_AR]) + AM_PROG_AR diff --git a/gcc9-fix-werror.patch b/gcc9-fix-werror.patch deleted file mode 100644 index 385983b..0000000 --- a/gcc9-fix-werror.patch +++ /dev/null @@ -1,23 +0,0 @@ -From cf1da68e3103022f93680208de24304726276936 Mon Sep 17 00:00:00 2001 -From: marxin -Date: Thu, 7 Mar 2019 10:33:29 +0100 -Subject: [PATCH] Fix #23 by off by one strncpy value. - ---- - lldp_dcbx_nl.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/lldp_dcbx_nl.c b/lldp_dcbx_nl.c -index 7a2dad2..357da9c 100644 ---- a/lldp_dcbx_nl.c -+++ b/lldp_dcbx_nl.c -@@ -561,7 +561,8 @@ int get_dcb_numtcs(const char *ifname, u8 *pgtcs, u8 *pfctcs) - - seq = nlh->nlmsg_seq; - -- strncpy(name, ifname, sizeof(name)); -+ strncpy(name, ifname, sizeof(name) - 1); -+ name[sizeof(name) - 1] = '\0'; - add_rta(nlh, DCB_ATTR_IFNAME, (void *)name, strlen(name) + 1); - rta_parent = add_rta(nlh, DCB_ATTR_NUMTCS, NULL, 0); - diff --git a/open-lldp.changes b/open-lldp.changes index 1f7ebce..832ecbe 100644 --- a/open-lldp.changes +++ b/open-lldp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu May 9 12:05:15 UTC 2019 - Martin Liška + +- Disable -Werror (boo#1128299) and remove gcc9-fix-werror.patch. + ------------------------------------------------------------------- Tue Mar 19 09:43:38 UTC 2019 - Martin Liška diff --git a/open-lldp.spec b/open-lldp.spec index 020651f..f8a85ed 100644 --- a/open-lldp.spec +++ b/open-lldp.spec @@ -32,7 +32,7 @@ BuildRequires: pkgconfig BuildRequires: readline-devel Url: https://github.com/intel/openlldp Source: %{name}-v%{version}.tar.xz -Patch0: gcc9-fix-werror.patch +Patch0: disable-werror.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: dcbd = %{version} Obsoletes: dcbd < %{version}