diff --git a/x11/kde4/konsole/Makefile b/x11/kde4/konsole/Makefile index bc81baf76dd..6471a081ac5 100644 --- a/x11/kde4/konsole/Makefile +++ b/x11/kde4/konsole/Makefile @@ -1,9 +1,8 @@ -# $OpenBSD: Makefile,v 1.4 2013/12/08 19:13:31 zhuk Exp $ +# $OpenBSD: Makefile,v 1.5 2014/01/27 10:23:40 zhuk Exp $ COMMENT = KDE terminal emulator DISTNAME = konsole-${MODKDE4_VERSION} - -# Check that sysctl() really could return EAGAIN (OpenBSDProcessInfo). +REVISION = 0 SHARED_LIBS = kdeinit4_konsole 51.0 SHARED_LIBS += konsoleprivate 51.0 diff --git a/x11/kde4/konsole/patches/patch-src_ProcessInfo_cpp b/x11/kde4/konsole/patches/patch-src_ProcessInfo_cpp new file mode 100644 index 00000000000..dcccb9bb966 --- /dev/null +++ b/x11/kde4/konsole/patches/patch-src_ProcessInfo_cpp @@ -0,0 +1,29 @@ +$OpenBSD: patch-src_ProcessInfo_cpp,v 1.1 2014/01/27 10:23:40 zhuk Exp $ +Fix sysctl(3) error handling. +--- src/ProcessInfo.cpp.orig Mon Jan 27 14:10:44 2014 ++++ src/ProcessInfo.cpp Mon Jan 27 14:15:43 2014 +@@ -781,7 +781,7 @@ class OpenBSDProcessInfo : public UnixProcessInfo (pri + managementInfoBase[2] = aPid; + managementInfoBase[3] = whatMib; + +- do { ++ while (true) { + len *= 2; + nbuf = realloc(buf, len); + if (nbuf == NULL) { +@@ -790,8 +790,13 @@ class OpenBSDProcessInfo : public UnixProcessInfo (pri + + buf = nbuf; + rc = ::sysctl(managementInfoBase, 4, buf, &len, NULL, 0); +- kWarning() << "sysctl() call failed with code" << errno; +- } while (rc == -1 && errno == ENOMEM); ++ if (rc != -1) { ++ break; ++ } else if (errno != ENOMEM) { ++ kWarning() << "sysctl() call failed with code" << errno; ++ break; ++ } ++ } + + if (nbuf == NULL || rc == -1) { + free(buf);