aboutsummaryrefslogtreecommitdiffstats
path: root/x11/kdelibs3
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2002-01-21 12:26:32 +0800
committerwill <will@FreeBSD.org>2002-01-21 12:26:32 +0800
commit9f35e4bf675b826c3c0118436c3c5a1c57e3243d (patch)
tree1b81602907a327d3ba9d7bd17d034f0a018693a2 /x11/kdelibs3
parent65c3c858634a23057341c9f8971f56fd33d82ab3 (diff)
downloadfreebsd-ports-gnome-9f35e4bf675b826c3c0118436c3c5a1c57e3243d.tar.gz
freebsd-ports-gnome-9f35e4bf675b826c3c0118436c3c5a1c57e3243d.tar.zst
freebsd-ports-gnome-9f35e4bf675b826c3c0118436c3c5a1c57e3243d.zip
Bring in a -real- fix for kdesu. Many thanks to Alan Eldridge and
Waldo Bastian for their work towards fixing this both in 2.2.2/ports and KDE3 CVS. Bump PORTREVISION to make sure people get *this* fix and not the previous broken one. PR: 32549 (for real this time) Submitted by: Alan Eldridge <alane@geeksrus.net>, Waldo Bastian <bastian@kde.org>
Diffstat (limited to 'x11/kdelibs3')
-rw-r--r--x11/kdelibs3/Makefile2
-rw-r--r--x11/kdelibs3/files/patch-kdesu::kdesu_pty.cpp18
-rw-r--r--x11/kdelibs3/files/patch-kdesu::process.cpp39
3 files changed, 58 insertions, 1 deletions
diff --git a/x11/kdelibs3/Makefile b/x11/kdelibs3/Makefile
index 51a2c7d8f2be..48a1f7455feb 100644
--- a/x11/kdelibs3/Makefile
+++ b/x11/kdelibs3/Makefile
@@ -7,7 +7,7 @@
PORTNAME= kdelibs
PORTVERSION= 2.2.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kdelibs3/files/patch-kdesu::kdesu_pty.cpp b/x11/kdelibs3/files/patch-kdesu::kdesu_pty.cpp
new file mode 100644
index 000000000000..74be807e3786
--- /dev/null
+++ b/x11/kdelibs3/files/patch-kdesu::kdesu_pty.cpp
@@ -0,0 +1,18 @@
+--- kdesu/kdesu_pty.cpp.orig Wed Apr 11 12:48:56 2001
++++ kdesu/kdesu_pty.cpp Thu Jan 10 18:35:17 2002
+@@ -101,13 +101,13 @@
+ #elif defined(HAVE_OPENPTY)
+ // 2: BSD interface
+ // More prefered than the linux hacks
+- char name[10];
++ char name[30];
+ int master_fd, slave_fd;
+ if (openpty(&master_fd, &slave_fd, name, 0L, 0L) != -1) {
+ ttyname = name;
+ name[5]='p';
+ ptyname = name;
+- //close(slave_fd); // We don't need this yet // Yes, we do.
++ close(slave_fd); // We don't need this yet // Yes, we do.
+ ptyfd = master_fd;
+ return ptyfd;
+ }
diff --git a/x11/kdelibs3/files/patch-kdesu::process.cpp b/x11/kdelibs3/files/patch-kdesu::process.cpp
new file mode 100644
index 000000000000..610789408085
--- /dev/null
+++ b/x11/kdelibs3/files/patch-kdesu::process.cpp
@@ -0,0 +1,39 @@
+--- kdesu/process.cpp.orig Sat Feb 17 21:03:18 2001
++++ kdesu/process.cpp Fri Jan 11 21:23:41 2002
+@@ -120,13 +120,16 @@
+ kdError(900) << k_lineinfo << "fcntl(F_GETFL): " << perror << "\n";
+ return ret;
+ }
++ int oflags = flags;
+ if (block)
+ flags &= ~O_NONBLOCK;
+ else
+ flags |= O_NONBLOCK;
+- if (fcntl(m_Fd, F_SETFL, flags) < 0)
++
++ if ((flags != oflags) && (fcntl(m_Fd, F_SETFL, flags) < 0))
+ {
+- kdError(900) << k_lineinfo << "fcntl(F_SETFL): " << perror << "\n";
++ // We get an error here when the child process has closed
++ // the file descriptor already.
+ return ret;
+ }
+
+@@ -231,12 +234,12 @@
+ path = QFile::encodeName(file);
+ }
+
+- int i;
+- const char * argp[32];
+- argp[0] = path;
+- QCStringList::Iterator it;
+- for (i=1, it=args.begin(); it!=args.end() && i<31; it++)
++ const char **argp = (const char **)malloc((args.count()+2)*sizeof(char *));
++ int i = 0;
++ argp[i++] = path;
++ for (QCStringList::ConstIterator it=args.begin(); it!=args.end(); it++)
+ argp[i++] = *it;
++
+ argp[i] = 0L;
+
+ execv(path, (char * const *)argp);