[118593] trunk/dports/devel/dbus

mcalhoun at macports.org mcalhoun at macports.org
Sat Apr 5 06:28:48 PDT 2014


Revision: 118593
          https://trac.macports.org/changeset/118593
Author:   mcalhoun at macports.org
Date:     2014-04-05 06:28:48 -0700 (Sat, 05 Apr 2014)
Log Message:
-----------
Workaround for pre-Lion lack of O_CLOEXEC.
Attempts to fix #43203.

Modified Paths:
--------------
    trunk/dports/devel/dbus/Portfile

Added Paths:
-----------
    trunk/dports/devel/dbus/files/patch-bus-dir-watch-kqueue.c.diff

Modified: trunk/dports/devel/dbus/Portfile
===================================================================
--- trunk/dports/devel/dbus/Portfile	2014-04-05 11:57:56 UTC (rev 118592)
+++ trunk/dports/devel/dbus/Portfile	2014-04-05 13:28:48 UTC (rev 118593)
@@ -27,6 +27,10 @@
 patchfiles      patch-bus-system.conf.in.diff \
                 patch-dbus-dbus-sysdeps-unix.c.diff
 
+# See #43203
+if { ${os.major} < 11 } {
+    patchfiles-append patch-bus-dir-watch-kqueue.c.diff
+}
 
 depends_build       \
     port:pkgconfig

Added: trunk/dports/devel/dbus/files/patch-bus-dir-watch-kqueue.c.diff
===================================================================
--- trunk/dports/devel/dbus/files/patch-bus-dir-watch-kqueue.c.diff	                        (rev 0)
+++ trunk/dports/devel/dbus/files/patch-bus-dir-watch-kqueue.c.diff	2014-04-05 13:28:48 UTC (rev 118593)
@@ -0,0 +1,19 @@
+--- bus/dir-watch-kqueue.c.orig	2014-01-06 09:02:19.000000000 -0700
++++ bus/dir-watch-kqueue.c	2014-04-05 06:07:05.000000000 -0700
+@@ -259,7 +259,7 @@
+           /* FIXME - less lame error handling for failing to add a watch;
+            * we may need to sleep.
+            */
+-          fd = open (new_dirs[i], O_RDONLY | O_CLOEXEC);
++          fd = open (new_dirs[i], O_RDONLY);
+           if (fd < 0)
+             {
+               if (errno != ENOENT)
+@@ -274,6 +274,7 @@
+                   continue;
+                 }
+             }
++          _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);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140405/e376bd5b/attachment.html>


More information about the macports-changes mailing list