summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2014-06-14 21:52:56 +0000
committerwiz <wiz@pkgsrc.org>2014-06-14 21:52:56 +0000
commit3705175eebed4cbbe59e3fbf2fe90cf5d42a3619 (patch)
tree07a61536822bd5bc12818a651d9a9aebc3802eea /sysutils
parentd71f4343c8f02ede57de69597b837b7e24c334ba (diff)
downloadpkgsrc-3705175eebed4cbbe59e3fbf2fe90cf5d42a3619.tar.gz
Switch O_CLOEXEC patch to the version that was committed upstream.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/dbus/distinfo4
-rw-r--r--sysutils/dbus/patches/patch-bus_dir-watch-kqueue.c37
2 files changed, 32 insertions, 9 deletions
diff --git a/sysutils/dbus/distinfo b/sysutils/dbus/distinfo
index 2bd7dbd09f9..47e48559241 100644
--- a/sysutils/dbus/distinfo
+++ b/sysutils/dbus/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.54 2014/06/14 21:48:34 wiz Exp $
+$NetBSD: distinfo,v 1.55 2014/06/14 21:52:56 wiz Exp $
SHA1 (dbus-1.8.4.tar.gz) = 316f1196312a88cc858ba810d4e5d16f70ab9d58
RMD160 (dbus-1.8.4.tar.gz) = 929ec1d4ff1a1087fc4ca920f49ee6f89d55b3b7
@@ -8,5 +8,5 @@ SHA1 (patch-ak) = 6d05ebde29acb3f6cb6f577dd2f2b734f590e8dd
SHA1 (patch-al) = 57d08196e9daf49eb6bda2b30f019ce2cad77c6f
SHA1 (patch-am) = 8c794ff8b0981e90243ee20c26ae1ecc72e68de8
SHA1 (patch-ba) = f9126faf18cd19e897865748ebea1011fe516225
-SHA1 (patch-bus_dir-watch-kqueue.c) = c5fa69bcb9d9c5716b02e1d2d0b49385846a2426
+SHA1 (patch-bus_dir-watch-kqueue.c) = 86a1f0f78b4d16d8ab29d351057885d8001dd39c
SHA1 (patch-dbus_dbus-sysdeps-unix.c) = 043e7bf03686f51faf763f87f43e00308b29571e
diff --git a/sysutils/dbus/patches/patch-bus_dir-watch-kqueue.c b/sysutils/dbus/patches/patch-bus_dir-watch-kqueue.c
index 558509303c4..665da39aea9 100644
--- a/sysutils/dbus/patches/patch-bus_dir-watch-kqueue.c
+++ b/sysutils/dbus/patches/patch-bus_dir-watch-kqueue.c
@@ -1,23 +1,46 @@
-$NetBSD: patch-bus_dir-watch-kqueue.c,v 1.1 2014/04/29 10:18:54 obache Exp $
+$NetBSD: patch-bus_dir-watch-kqueue.c,v 1.2 2014/06/14 21:52:56 wiz Exp $
* For platforms missing O_CLOEXEC
https://bugs.freedesktop.org/show_bug.cgi?id=77032
---- bus/dir-watch-kqueue.c.orig 2014-01-06 16:02:19.000000000 +0000
+--- bus/dir-watch-kqueue.c.orig 2014-01-25 12:39:24.000000000 +0000
+++ bus/dir-watch-kqueue.c
-@@ -259,7 +259,15 @@ bus_set_watched_dirs (BusContext *contex
+@@ -202,6 +202,9 @@ bus_set_watched_dirs (BusContext *contex
+ DBusList *link;
+ int i, j, fd;
+ struct kevent ev;
++#ifdef O_CLOEXEC
++ dbus_bool_t cloexec_done = 0;
++#endif
+
+ if (!_init_kqueue (context))
+ goto out;
+@@ -259,7 +262,15 @@ bus_set_watched_dirs (BusContext *contex
/* FIXME - less lame error handling for failing to add a watch;
* we may need to sleep.
*/
+#ifdef O_CLOEXEC
fd = open (new_dirs[i], O_RDONLY | O_CLOEXEC);
++ cloexec_done = (fd >= 0);
+
+ if (fd < 0 && errno == EINVAL)
+#endif
-+ {
-+ fd = open (new_dirs[i], O_RDONLY);
-+ _dbus_fd_set_close_on_exec (fd);
-+ }
++ {
++ fd = open (new_dirs[i], O_RDONLY);
++ }
if (fd < 0)
{
if (errno != ENOENT)
+@@ -274,6 +285,12 @@ bus_set_watched_dirs (BusContext *contex
+ continue;
+ }
+ }
++#ifdef O_CLOEXEC
++ if (!cloexec_done)
++#endif
++ {
++ _dbus_fd_set_close_on_exec (fd);
++ }
+
+ EV_SET (&ev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR,
+ NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_RENAME, 0, 0);