[lldpad] Fix build by patching the sizeof() call

Petr Šabata psabata at fedoraproject.org
Tue Mar 5 15:20:06 UTC 2013


commit 1418290a8ca08b888372c0398710a59cc7d7bea9
Author: Petr Šabata <contyk at redhat.com>
Date:   Tue Mar 5 16:20:02 2013 +0100

    Fix build by patching the sizeof() call

 lldpad-0.9.45-sizeof.patch |   13 +++++++++++++
 lldpad.spec                |    7 ++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/lldpad-0.9.45-sizeof.patch b/lldpad-0.9.45-sizeof.patch
new file mode 100644
index 0000000..62216e6
--- /dev/null
+++ b/lldpad-0.9.45-sizeof.patch
@@ -0,0 +1,13 @@
+diff --git a/lldp_8021qaz_cmds.c b/lldp_8021qaz_cmds.c
+index 0db2c9c..4f23229 100644
+--- a/lldp_8021qaz_cmds.c
++++ b/lldp_8021qaz_cmds.c
+@@ -821,7 +821,7 @@ _set_arg_tsa(struct cmd *cmd, char *args, const char *arg_value,
+ 			toked_maps = strtok(NULL, ",");
+ 		}
+ 	} else if (!test) {
+-		memset(tsa, 0, sizeof(tsa));
++		memset(tsa, 0, sizeof(u8));
+ 	}
+ 
+ 	if (test) {
diff --git a/lldpad.spec b/lldpad.spec
index 7b09c08..0bbe509 100644
--- a/lldpad.spec
+++ b/lldpad.spec
@@ -3,7 +3,7 @@
 
 Name:               lldpad
 Version:            0.9.45
-Release:            4%{?dist}
+Release:            5%{?dist}
 Summary:            Intel LLDP Agent
 Group:              System Environment/Daemons
 License:            GPLv2
@@ -12,6 +12,7 @@ Source0:            %{name}-%{version}.tar.gz
 Patch0:             lldpad-0.9.45-archiver.patch
 Patch1:             lldpad-0.9.41-lldptool-invalid-pointer.patch
 Patch2:             lldpad-0.9.45-The-display-of-the-Management-Address-TLV-had-some.patch
+Patch3:             lldpad-0.9.45-sizeof.patch
 Requires:           kernel >= 2.6.32
 BuildRequires:      systemd-units
 BuildRequires:      libconfig-devel >= 1.3.2 kernel-headers >= 2.6.32
@@ -46,6 +47,7 @@ that use %{name}.
 %patch0 -p1 -b .archiver
 %patch1 -p1 -b .invalid-pointer
 %patch2 -p1
+%patch3 -p1
 
 %build
 ./bootstrap.sh
@@ -105,6 +107,9 @@ fi
 %{_libdir}/liblldp_clif.so
 
 %changelog
+* Tue Mar 05 2013 Petr Šabata <contyk at redhat.com> - 0.9.45-5
+- Fix build by patching the sizeof() call in lldp_8021qaz_cmds.c
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.45-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list