Re: [MacPorts] #43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared
MacPorts
noreply at macports.org
Thu Apr 3 14:22:19 PDT 2014
#43203: dbus not building on 10.6.8. ‘O_CLOEXEC’ undeclared
------------------------+--------------------------------
Reporter: gnurser@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.2.1
Resolution: | Keywords:
Port: |
------------------------+--------------------------------
Comment (by egall@…):
`O_CLOEXEC` is normally defined in `fcntl.h`, but the `fcntl.h` from
Darwin's Libc is just a wrapper around `<sys/fcntl.h>`. I am also on Snow
Leopard, so I checked my `<sys/fcntl.h>`, and can confirm that I do not
have `O_CLOEXEC` in mine, either. I tried checking newer versions the
Darwin Libc sources on opensource.apple.com, but could not find where
`<sys/fcntl.h>` is located in there... Anyways, the next thing I checked
was Gnulib, and Gnulib's `fcntl.h` defines `O_CLOEXEC` like this:
{{{
#if !defined O_CLOEXEC && defined O_NOINHERIT
/* Mingw spells it 'O_NOINHERIT'. */
# define O_CLOEXEC O_NOINHERIT
#endif
#ifndef O_CLOEXEC
# define O_CLOEXEC 0
#endif
}}}
Gnulib also provides a `cloexec.c` file and a `cloexec.h` file that, taken
together, actually implement the functionality that the `O_CLOEXEC` flag
represents. `dbus` could try using these in cases when `O_CLOEXEC` is not
available...
--
Ticket URL: <https://trac.macports.org/ticket/43203#comment:1>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list