summaryrefslogtreecommitdiffstats
path: root/devel/ORBit
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-10-26 13:06:01 +0000
committersobomax <sobomax@FreeBSD.org>2001-10-26 13:06:01 +0000
commit4ea42b23c8064eaeae269593d14fcc928108a11f (patch)
tree358ec517585bf2c8fe45dadbe3185eb16274e184 /devel/ORBit
parent546b9e0e1c99f3432cf8959334bf3ec0564bf572 (diff)
downloadFreeBSD-ports-4ea42b23c8064eaeae269593d14fcc928108a11f.zip
FreeBSD-ports-4ea42b23c8064eaeae269593d14fcc928108a11f.tar.gz
Fix a rather weird incompatibility between ORBit and FreeBSD. It appears that
FreeBSD's writev(2) implementation is rather unreliable when large number of vectors is submitted - it returns EINVAL despite the fact that all arguments are pretty valid. This caused serious problems with GNOME's oaf and prevented Nautilus from working properly. The problem disappeared when I've replaced writev(2) call with appropriate loop based around ordinary write(2). Perhaps this should be investigated and the real source of the problem fixed instead, but I do not have a time for this right now. For those who interested I'm ready to provide a step-by step instruction on how to reproduce the bug. Special thanks to: andersca @ nautilus#irc.gnome.org
Diffstat (limited to 'devel/ORBit')
-rw-r--r--devel/ORBit/Makefile2
-rw-r--r--devel/ORBit/files/patch-src::IIOP::giop-msg-buffer.c24
2 files changed, 25 insertions, 1 deletions
diff --git a/devel/ORBit/Makefile b/devel/ORBit/Makefile
index c4ad0dd..8426c47 100644
--- a/devel/ORBit/Makefile
+++ b/devel/ORBit/Makefile
@@ -7,7 +7,7 @@
PORTNAME= ORBit
PORTVERSION= 0.5.10
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= stable/sources/ORBit
diff --git a/devel/ORBit/files/patch-src::IIOP::giop-msg-buffer.c b/devel/ORBit/files/patch-src::IIOP::giop-msg-buffer.c
new file mode 100644
index 0000000..a423204
--- /dev/null
+++ b/devel/ORBit/files/patch-src::IIOP::giop-msg-buffer.c
@@ -0,0 +1,24 @@
+
+$FreeBSD$
+
+--- src/IIOP/giop-msg-buffer.c 2001/10/26 12:42:42 1.1
++++ src/IIOP/giop-msg-buffer.c 2001/10/26 12:42:53
+@@ -197,7 +197,17 @@
+ sum);
+ }
+ #endif
+- res = writev(fd, curvec, nvecs);
++ for(sum = 0, t = 0; t < nvecs; t++) {
++ do {
++ res = write(fd, curvec[t].iov_base, curvec[t].iov_len);
++ } while (res < 0 && errno == EAGAIN);
++ if (res < 0) {
++ break;
++ } else
++ sum += res;
++ }
++ if (res >= 0)
++ res = sum;
+
+ sum = (GIOP_MESSAGE_BUFFER(send_buffer)->message_header.message_size + sizeof(GIOPMessageHeader));
+ if(res < sum) {
OpenPOWER on IntegriCloud