pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/zeromq zeromq: fix build on NetBSD. it has SOCK_CL...
details: https://anonhg.NetBSD.org/pkgsrc/rev/fc7e43ca3425
branches: trunk
changeset: 358029:fc7e43ca3425
user: maya <maya%pkgsrc.org@localhost>
date: Fri Feb 03 16:39:15 2017 +0000
description:
zeromq: fix build on NetBSD. it has SOCK_CLOEXEC, but no accept4.
it's expected to use paccept instead. do this.
tests 75/78 passing
diffstat:
net/zeromq/distinfo | 4 +++-
net/zeromq/patches/patch-src_ipc__listener.cpp | 18 ++++++++++++++++++
net/zeromq/patches/patch-src_tcp__listener.cpp | 18 ++++++++++++++++++
3 files changed, 39 insertions(+), 1 deletions(-)
diffs (58 lines):
diff -r c2ab65a7e481 -r fc7e43ca3425 net/zeromq/distinfo
--- a/net/zeromq/distinfo Fri Feb 03 16:20:18 2017 +0000
+++ b/net/zeromq/distinfo Fri Feb 03 16:39:15 2017 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.22 2017/02/02 10:09:53 fhajny Exp $
+$NetBSD: distinfo,v 1.23 2017/02/03 16:39:15 maya Exp $
SHA1 (zeromq-4.2.1.tar.gz) = 2145aef176dbc944822a9b4585273d17e9b9fb7b
RMD160 (zeromq-4.2.1.tar.gz) = 888085cca7f16ecd5487f9e518fdc59e5c8672ad
SHA512 (zeromq-4.2.1.tar.gz) = 6ef52edff930be34451e81bd21a7e23f08e135c8e10e006d0a6146e7fa4171e9dcf9065f77c33cb0c0db4c16cff4a50cab2a9d612e306490a02bc6a4a913ba6a
Size (zeromq-4.2.1.tar.gz) = 1243428 bytes
SHA1 (patch-configure) = 5501450e277660d649d53f8a9d753037b4a22f15
+SHA1 (patch-src_ipc__listener.cpp) = 8c5b2c9a3258a57427b0a58ca95dca87bf46f0e8
+SHA1 (patch-src_tcp__listener.cpp) = 9a2781d610989c41697506341ef2bb4dbb416cf1
diff -r c2ab65a7e481 -r fc7e43ca3425 net/zeromq/patches/patch-src_ipc__listener.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/zeromq/patches/patch-src_ipc__listener.cpp Fri Feb 03 16:39:15 2017 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_ipc__listener.cpp,v 1.1 2017/02/03 16:39:16 maya Exp $
+
+NetBSD has SOCK_CLOEXEC -- but uses it with paccept, not accept4
+
+--- src/ipc_listener.cpp.orig 2016-12-31 15:25:47.000000000 +0000
++++ src/ipc_listener.cpp
+@@ -391,7 +391,11 @@ zmq::fd_t zmq::ipc_listener_t::accept ()
+ // resources is considered valid and treated by ignoring the connection.
+ zmq_assert (s != retired_fd);
+ #if defined ZMQ_HAVE_SOCK_CLOEXEC
++#if defined(__NetBSD__)
++ fd_t sock = ::paccept (s, NULL, NULL, NULL, SOCK_CLOEXEC);
++#else
+ fd_t sock = ::accept4 (s, NULL, NULL, SOCK_CLOEXEC);
++#endif
+ #else
+ fd_t sock = ::accept (s, NULL, NULL);
+ #endif
diff -r c2ab65a7e481 -r fc7e43ca3425 net/zeromq/patches/patch-src_tcp__listener.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/zeromq/patches/patch-src_tcp__listener.cpp Fri Feb 03 16:39:15 2017 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_tcp__listener.cpp,v 1.1 2017/02/03 16:39:16 maya Exp $
+
+NetBSD has SOCK_CLOEXEC, but uses it with paccept, not accept4
+
+--- src/tcp_listener.cpp.orig 2016-12-31 15:25:47.000000000 +0000
++++ src/tcp_listener.cpp
+@@ -274,7 +274,11 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
+ socklen_t ss_len = sizeof (ss);
+ #endif
+ #if defined ZMQ_HAVE_SOCK_CLOEXEC
++#if defined(__NetBSD__)
++ fd_t sock = ::paccept (s, (struct sockaddr *) &ss, &ss_len, NULL, SOCK_CLOEXEC);
++#else
+ fd_t sock = ::accept4 (s, (struct sockaddr *) &ss, &ss_len, SOCK_CLOEXEC);
++#endif
+ #else
+ fd_t sock = ::accept (s, (struct sockaddr *) &ss, &ss_len);
+ #endif
Home |
Main Index |
Thread Index |
Old Index