- Add libsodium-init.patch to handle sodium_init() error.

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zeromq?expand=0&rev=41
This commit is contained in:
Ismail Dönmez 2015-11-05 09:48:04 +00:00 committed by Git OBS Bridge
parent 29cd708838
commit d32465c660
3 changed files with 35 additions and 0 deletions

28
libsodium-init.patch Normal file
View File

@ -0,0 +1,28 @@
Index: zeromq-4.1.3/src/curve_client.cpp
===================================================================
--- zeromq-4.1.3.orig/src/curve_client.cpp
+++ zeromq-4.1.3/src/curve_client.cpp
@@ -57,8 +57,7 @@ zmq::curve_client_t::curve_client_t (con
unsigned char tmpbytes[4];
randombytes(tmpbytes, 4);
#else
- // todo check return code
- sodium_init();
+ zmq_assert (sodium_init() != -1);
#endif
// Generate short-term key pair
Index: zeromq-4.1.3/src/curve_server.cpp
===================================================================
--- zeromq-4.1.3.orig/src/curve_server.cpp
+++ zeromq-4.1.3/src/curve_server.cpp
@@ -60,8 +60,7 @@ zmq::curve_server_t::curve_server_t (ses
unsigned char tmpbytes[4];
randombytes(tmpbytes, 4);
#else
- // todo check return code
- sodium_init();
+ zmq_assert (sodium_init() != -1);
#endif
// Generate short-term key pair

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Nov 5 09:36:36 UTC 2015 - idonmez@suse.com
- Add libsodium-init.patch to handle sodium_init() error.
-------------------------------------------------------------------
Tue Oct 6 11:26:39 UTC 2015 - idonmez@suse.com

View File

@ -28,6 +28,7 @@ License: LGPL-3.0+
Group: Productivity/Networking/Web/Servers
Url: http://www.zeromq.org/
Source: http://download.zeromq.org/%{name}-%{version}.tar.gz
Patch1: libsodium-init.patch
BuildRequires: asciidoc
BuildRequires: gcc-c++
BuildRequires: pkgconfig
@ -109,6 +110,7 @@ This package holds the development files for ZeroMQ.
%prep
%setup -q
%patch1 -p1
%build
%configure \