From 9bcbcdfbc13f14fb843c64fa62143980fd4e238a Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Fri, 2 Jan 2015 14:22:54 -0500 Subject: [PATCH] prosody: fix use of randomseed (prosody issue #439) Signed-off-by: W. Michael Petullo --- net/prosody/Makefile | 2 +- net/prosody/patches/010-fix-randomseed.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 net/prosody/patches/010-fix-randomseed.patch diff --git a/net/prosody/Makefile b/net/prosody/Makefile index af437bbe5c..a829ce8c20 100644 --- a/net/prosody/Makefile +++ b/net/prosody/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=prosody PKG_VERSION:=0.9.7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://prosody.im/downloads/source diff --git a/net/prosody/patches/010-fix-randomseed.patch b/net/prosody/patches/010-fix-randomseed.patch new file mode 100644 index 0000000000..05bdffa678 --- /dev/null +++ b/net/prosody/patches/010-fix-randomseed.patch @@ -0,0 +1,12 @@ +diff -u --recursive prosody-0.9.7-vanilla/net/dns.lua prosody-0.9.7/net/dns.lua +--- prosody-0.9.7-vanilla/net/dns.lua 2015-01-02 00:26:19.981433830 -0500 ++++ prosody-0.9.7/net/dns.lua 2015-01-02 00:33:10.467077715 -0500 +@@ -225,7 +225,7 @@ + + + function dns.random(...) -- - - - - - - - - - - - - - - - - - - dns.random +- math.randomseed(math.floor(10000*socket.gettime()) % 0x100000000); ++ math.randomseed(math.floor(10000*socket.gettime()) % 0x80000000); + dns.random = math.random; + return dns.random(...); + end -- 2.30.2