[packages/imap] - fix building with -Werror=format-security

hawk hawk at pld-linux.org
Thu Nov 14 12:55:17 CET 2013


commit 3d7850ac3f0bdfa42dcc38e78cf9c1615398066b
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Thu Nov 14 11:54:37 2013 +0000

    - fix building with -Werror=format-security

 imap-werror.patch | 12 ++++++++++++
 imap.spec         |  4 +++-
 2 files changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/imap.spec b/imap.spec
index 49663f1..288dc0d 100644
--- a/imap.spec
+++ b/imap.spec
@@ -7,7 +7,7 @@ Summary(uk.UTF-8):	Забезпечує підтримку мережевого
 Summary(zh_CN.UTF-8):	IMAP和POP服务器
 Name:		imap
 Version:	2007f
-Release:	2
+Release:	3
 Epoch:		1
 License:	Apache v2.0
 Group:		Networking/Daemons
@@ -31,6 +31,7 @@ Patch6:		%{name}-overflow.patch
 Patch7:		%{name}-version-pld.patch
 Patch8:		%{name}-headers_fix.patch
 Patch9:		%{name}-annotations.patch
+Patch10:	%{name}-werror.patch
 URL:		http://www.washington.edu/imap/
 BuildRequires:	/sbin/ldconfig
 BuildRequires:	openssl-devel >= 0.9.7d
@@ -296,6 +297,7 @@ POP/IMAP.
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
 
 cd docs/rfc
 ls rfc* > ../INDEX.rfc
diff --git a/imap-werror.patch b/imap-werror.patch
new file mode 100644
index 0000000..1be8e3d
--- /dev/null
+++ b/imap-werror.patch
@@ -0,0 +1,12 @@
+diff -ur imap-2007f.orig/src/osdep/unix/flocklnx.c imap-2007f.fix/src/osdep/unix/flocklnx.c
+--- imap-2007f.orig/src/osdep/unix/flocklnx.c	2011-07-23 00:20:11.000000000 +0000
++++ imap-2007f.fix/src/osdep/unix/flocklnx.c	2013-11-14 11:48:37.216449543 +0000
+@@ -57,7 +57,7 @@
+     case ENOLCK:		/* lock table is full */
+       sprintf (tmp,"File locking failure: %s",strerror (errno));
+       mm_log (tmp,WARN);	/* give the user a warning of what happened */
+-      if (!logged++) syslog (LOG_ERR,tmp);
++      if (!logged++) syslog ("%s",LOG_ERR,tmp);
+ 				/* return failure if non-blocking lock */
+       if (op & LOCK_NB) return -1;
+       sleep (5);		/* slow down in case it loops */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/imap.git/commitdiff/3d7850ac3f0bdfa42dcc38e78cf9c1615398066b



More information about the pld-cvs-commit mailing list