[packages/vlan] Add patch to fix build with -Werror=format-security

megabajt megabajt at pld-linux.org
Wed Jan 30 21:54:53 CET 2013


commit ae0c5c66868542dea8d8bd37d7409771c5ef98e0
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date:   Wed Jan 30 21:54:04 2013 +0100

    Add patch to fix build with -Werror=format-security

 vlan-format-security.patch | 12 ++++++++++++
 vlan.spec                  |  2 ++
 2 files changed, 14 insertions(+)
---
diff --git a/vlan.spec b/vlan.spec
index bbed781..05ff431 100644
--- a/vlan.spec
+++ b/vlan.spec
@@ -14,6 +14,7 @@ Source0:	http://www.candelatech.com/~greear/vlan/%{name}.%{version}.tar.gz
 Source1:	http://www.candelatech.com/~greear/vlan/cisco_howto.html
 # Source1-md5:	cf0422b58d1a83d088a65b0fb052ec8a
 URL:		http://www.candelatech.com/~greear/vlan.html
+Patch0:		%{name}-format-security.patch
 %{?with_dist_kernel:Conflicts:	kernel < 2.4}
 Obsoletes:	vconfig
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -30,6 +31,7 @@ vconfig, który pozwala na zarządzanie vlanami.
 
 %prep
 %setup -q -n %{name}
+%patch0 -p1
 
 install %{SOURCE1} .
 
diff --git a/vlan-format-security.patch b/vlan-format-security.patch
new file mode 100644
index 0000000..6cd242e
--- /dev/null
+++ b/vlan-format-security.patch
@@ -0,0 +1,12 @@
+diff -urN vlan/vconfig.c vlan.new/vconfig.c
+--- vlan/vconfig.c	2005-07-29 19:38:42.000000000 +0200
++++ vlan.new/vconfig.c	2013-01-30 21:52:38.455449972 +0100
+@@ -63,7 +63,7 @@
+ "            is OFF.\n";
+ 
+ void show_usage() {
+-   fprintf(stdout,usage);
++   fputs(usage, stdout);
+ }
+ 
+ int hex_to_bytes(char* bytes, int bytes_length, char* hex_str) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vlan.git/commitdiff/ae0c5c66868542dea8d8bd37d7409771c5ef98e0



More information about the pld-cvs-commit mailing list