[jabberd] added patch for "multiple calls of srand() with expat-2.1.0"

Adrian Reber adrian at fedoraproject.org
Wed Jun 20 10:10:43 UTC 2012


commit 5283511d5bc61540def62f682e2360885d6581aa
Author: Adrian Reber <adrian at lisas.de>
Date:   Wed Jun 20 12:10:37 2012 +0200

    added patch for "multiple calls of srand() with expat-2.1.0"
    
      https://github.com/Jabberd2/jabberd2/pull/5

 d452eec68b342977cd9fc6863c2e1aee1b99feb3.patch |   48 ++++++++++++++++++++++++
 jabberd.spec                                   |    9 ++++-
 2 files changed, 56 insertions(+), 1 deletions(-)
---
diff --git a/d452eec68b342977cd9fc6863c2e1aee1b99feb3.patch b/d452eec68b342977cd9fc6863c2e1aee1b99feb3.patch
new file mode 100644
index 0000000..664cc01
--- /dev/null
+++ b/d452eec68b342977cd9fc6863c2e1aee1b99feb3.patch
@@ -0,0 +1,48 @@
+From d9e256545443e3a94ea49a10acca8f70f8563a08 Mon Sep 17 00:00:00 2001
+From: Eugene Agafonov <e.a.agafonov at gmail.com>
+Date: Fri, 15 Jun 2012 22:24:36 +0400
+Subject: [PATCH] Utilize XML_SetHashSalt
+
+---
+ sx/sx.c     |    5 +++++
+ util/util.h |    1 +
+ 2 files changed, 6 insertions(+)
+
+diff --git a/sx/sx.c b/sx/sx.c
+index 4def214..5fc179f 100644
+--- a/sx/sx.c
++++ b/sx/sx.c
+@@ -19,6 +19,7 @@
+  */
+ 
+ #include "sx.h"
++#include <time.h>
+ 
+ sx_t sx_new(sx_env_t env, int tag, sx_callback_t cb, void *arg) {
+     sx_t s;
+@@ -47,6 +48,10 @@ sx_t sx_new(sx_env_t env, int tag, sx_callback_t cb, void *arg) {
+     XML_SetDefaultHandler(s->expat, NULL);
+ #endif
+ 
++#ifdef HAVE_XML_SETHASHSALT
++    XML_SetHashSalt(s->expat, clock());
++#endif
++
+     s->wbufq = jqueue_new();
+     s->rnadq = jqueue_new();
+ 
+diff --git a/util/util.h b/util/util.h
+index 802e25c..d6fe9f8 100644
+--- a/util/util.h
++++ b/util/util.h
+@@ -450,6 +450,7 @@ struct _jqueue_node_st {
+ #if XML_MAJOR_VERSION > 1
+ /* XML_StopParser is present in expat 2.x */
+ #define HAVE_XML_STOPPARSER
++#define HAVE_XML_SETHASHSALT
+ #endif
+ 
+ /* define TRUE and FALSE if not yet defined */
+-- 
+1.7.10
+
diff --git a/jabberd.spec b/jabberd.spec
index 3f3823f..fbf311c 100644
--- a/jabberd.spec
+++ b/jabberd.spec
@@ -1,7 +1,7 @@
 Summary:        OpenSource server implementation of the Jabber protocols
 Name:           jabberd
 Version:        2.2.16
-Release:        1%{?dist}
+Release:        2%{?dist}
 License:        GPLv2+
 Group:          System Environment/Daemons
 Source0:        https://github.com/downloads/Jabberd2/jabberd2/jabberd-%{version}.tar.gz
@@ -11,6 +11,8 @@ Source3:        jabberd-s2s.service
 Source4:        jabberd-sm.service
 Source5:        jabberd-router.service
 Patch0:         https://github.com/Jabberd2/jabberd2/commit/41884d9919.patch
+# https://github.com/Jabberd2/jabberd2/pull/5
+Patch1:		https://github.com/Jabberd2/jabberd2/commit/d452eec68b342977cd9fc6863c2e1aee1b99feb3.patch
 URL:            http://codex.xiaoka.com/wiki/jabberd2:start
 BuildRequires:  openssl-devel libidn-devel expat-devel
 BuildRequires:  systemd-units cppunit-devel
@@ -44,6 +46,7 @@ This package defaults to use pam and sqlite.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 export CFLAGS="%{optflags}"
@@ -213,6 +216,10 @@ fi
 %attr(700, jabber, jabber) %{_var}/lib/%{name}
 
 %changelog
+* Wed Jun 20 2012 Adrian Reber <adrian at lisas.de> - 2.2.16-2
+- added patch for "multiple calls of srand() with expat-2.1.0"
+  https://github.com/Jabberd2/jabberd2/pull/5
+
 * Sat May 05 2012 Adrian Reber <adrian at lisas.de> - 2.2.16-1
 - updated to 2.2.16
 - added patch 41884d9919.patch to build without debug


More information about the scm-commits mailing list