summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/ORBit/distinfo3
-rw-r--r--net/ORBit/patches/patch-an44
2 files changed, 46 insertions, 1 deletions
diff --git a/net/ORBit/distinfo b/net/ORBit/distinfo
index 4cc83a68e2b..26147a505ff 100644
--- a/net/ORBit/distinfo
+++ b/net/ORBit/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2002/01/15 23:52:11 rh Exp $
+$NetBSD: distinfo,v 1.8 2002/03/22 11:26:04 agc Exp $
SHA1 (ORBit-0.5.13.tar.gz) = ea8d790b040356e90fd81aa98313c2c1b08f3bcf
Size (ORBit-0.5.13.tar.gz) = 1183657 bytes
@@ -13,3 +13,4 @@ SHA1 (patch-ai) = a5ec30692a14fb6bef617f262b6bb1fdd8903436
SHA1 (patch-ak) = d569014320dbea40ccdb9e369e07c984ee7bd9de
SHA1 (patch-al) = 0bba5ec17f8b663f1ca9427538bac238411321a0
SHA1 (patch-am) = c959b34edc150c1d503d2bb294f072e885daed58
+SHA1 (patch-an) = 1ddda1443d527d54f8b4b2ffab500a746e82b0d1
diff --git a/net/ORBit/patches/patch-an b/net/ORBit/patches/patch-an
new file mode 100644
index 00000000000..b930909c4d0
--- /dev/null
+++ b/net/ORBit/patches/patch-an
@@ -0,0 +1,44 @@
+$NetBSD: patch-an,v 1.1 2002/03/22 11:26:05 agc Exp $
+
+Also handle EINVAL error to writev(2)
+
+--- src/IIOP/giop-msg-buffer.c 2002/03/22 10:43:32 1.1
++++ src/IIOP/giop-msg-buffer.c 2002/03/22 10:44:27
+@@ -169,6 +169,37 @@
+ return msgbuf;
+ }
+
++#ifdef __NetBSD__
++/* NetBSD returns EINVAL if we try to send > IOV_MAX iovecs */
++/* wrap writev so that we only ever try to send IOV_MAX at most */
++
++#include <limits.h>
++
++static int
++wrap_writev(int fd, const struct iovec *vector, size_t count)
++{
++ size_t n;
++ int ret;
++ int wc;
++
++ ret = 0;
++ while (count > 0) {
++ n = MIN(IOV_MAX, count);
++ if ((wc = writev(fd, vector, n)) < 0) {
++ break;
++ }
++ ret += wc;
++ vector += n;
++ count -= n;
++ }
++ return ret;
++}
++
++#define writev wrap_writev
++
++#endif /* __NetBSD__ */
++
++
+ gint
+ giop_send_buffer_write(GIOPSendBuffer *send_buffer)
+ {