[packages/libcaca] - added format patch to fix build with -Werror=format-security

qboosh qboosh at pld-linux.org
Tue Dec 4 20:28:50 CET 2012


commit c4712b27cc850ca87b3797398df4f6b0be7b082c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Dec 4 20:29:26 2012 +0100

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

 libcaca-format.patch | 38 ++++++++++++++++++++++++++++++++++++++
 libcaca.spec         |  2 ++
 2 files changed, 40 insertions(+)
---
diff --git a/libcaca.spec b/libcaca.spec
index f77567c..66c1337 100644
--- a/libcaca.spec
+++ b/libcaca.spec
@@ -23,6 +23,7 @@ Source0:	http://libcaca.zoy.org/files/libcaca/%{name}-%{version}.%{subver}.tar.g
 # Source0-md5:	93d35dbdb0527d4c94df3e9a02e865cc
 Patch0:		install.patch
 Patch1:		%{name}-ruby1.9.patch
+Patch2:		%{name}-format.patch
 URL:		http://libcaca.zoy.org/
 BuildRequires:	OpenGL-devel
 BuildRequires:	autoconf >= 2.50
@@ -243,6 +244,7 @@ Wiązania języka Ruby do libcaca.
 %undos */Makefile.am
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__libtoolize}
diff --git a/libcaca-format.patch b/libcaca-format.patch
new file mode 100644
index 0000000..e0847ab
--- /dev/null
+++ b/libcaca-format.patch
@@ -0,0 +1,38 @@
+--- libcaca-0.99.beta18/ruby/caca-display.c.orig	2012-04-06 22:36:17.000000000 +0200
++++ libcaca-0.99.beta18/ruby/caca-display.c	2012-12-04 20:28:37.435444821 +0100
+@@ -84,7 +84,7 @@
+ 
+     if(display == NULL)
+     {
+-        rb_raise(rb_eRuntimeError, strerror(errno));
++        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
+     }
+ 
+     _SELF = display;
+@@ -131,7 +131,7 @@
+ {
+     if(caca_set_display_title(_SELF, StringValuePtr(t))<0)
+     {
+-        rb_raise(rb_eRuntimeError, strerror(errno));
++        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
+     }
+     return t;
+ }
+@@ -252,7 +252,7 @@
+ {
+     if(caca_set_display_driver(_SELF, StringValuePtr(driver))<0)
+     {
+-        rb_raise(rb_eRuntimeError, strerror(errno));
++        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
+     }
+     return driver;
+ }
+@@ -267,7 +267,7 @@
+ {
+     if(caca_set_cursor(_SELF, flag)<0)
+     {
+-        rb_raise(rb_eRuntimeError, strerror(errno));
++        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
+     }
+     return flag;
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libcaca.git/commitdiff/c4712b27cc850ca87b3797398df4f6b0be7b082c



More information about the pld-cvs-commit mailing list