[142960] trunk/base/src/pextlib1.0/sip_copy_proc.c

snc at macports.org snc at macports.org
Sat Dec 12 07:57:57 PST 2015


Revision: 142960
          https://trac.macports.org/changeset/142960
Author:   snc at macports.org
Date:     2015-11-29 12:15:50 -0800 (Sun, 29 Nov 2015)
Log Message:
-----------
pextlib1.0: 10.6 and earlier do not have O_CLOEXEC

Modified Paths:
--------------
    trunk/base/src/pextlib1.0/sip_copy_proc.c

Modified: trunk/base/src/pextlib1.0/sip_copy_proc.c
===================================================================
--- trunk/base/src/pextlib1.0/sip_copy_proc.c	2015-11-29 16:18:11 UTC (rev 142959)
+++ trunk/base/src/pextlib1.0/sip_copy_proc.c	2015-11-29 20:15:50 UTC (rev 142960)
@@ -330,8 +330,13 @@
         goto lazy_copy_out;
     }
 
+#ifdef O_CLOEXEC
     if (-1 == (infd = open(path, O_RDONLY | O_CLOEXEC))) {
         fprintf(stderr, "sip_copy_proc: open(%s, O_RDONLY | O_CLOEXEC): %s\n", path, strerror(errno));
+#else
+    if (-1 == (infd = open(path, O_RDONLY))) {
+        fprintf(stderr, "sip_copy_proc: open(%s, O_RDONLY): %s\n", path, strerror(errno));
+#endif
         goto lazy_copy_out;
     }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/ae933108/attachment.html>


More information about the macports-changes mailing list