aboutsummaryrefslogtreecommitdiffstats
path: root/devel/ORBit2
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-10-26 21:06:01 +0800
committersobomax <sobomax@FreeBSD.org>2001-10-26 21:06:01 +0800
commit4ea42b23c8064eaeae269593d14fcc928108a11f (patch)
tree358ec517585bf2c8fe45dadbe3185eb16274e184 /devel/ORBit2
parent546b9e0e1c99f3432cf8959334bf3ec0564bf572 (diff)
downloadfreebsd-ports-graphics-4ea42b23c8064eaeae269593d14fcc928108a11f.tar.gz
freebsd-ports-graphics-4ea42b23c8064eaeae269593d14fcc928108a11f.tar.zst
freebsd-ports-graphics-4ea42b23c8064eaeae269593d14fcc928108a11f.zip
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/ORBit2')
-rw-r--r--devel/ORBit2/Makefile2
-rw-r--r--devel/ORBit2/files/patch-src::IIOP::giop-msg-buffer.c24
2 files changed, 25 insertions, 1 deletions
diff --git a/devel/ORBit2/Makefile b/devel/ORBit2/Makefile
index c4ad0ddc44f..8426c47c173 100644
--- a/devel/ORBit2/Makefile
+++ b/devel/ORBit2/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/ORBit2/files/patch-src::IIOP::giop-msg-buffer.c b/devel/ORBit2/files/patch-src::IIOP::giop-msg-buffer.c
new file mode 100644
index 00000000000..a4232041052
--- /dev/null
+++ b/devel/ORBit2/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) {