Opened 11 years ago

Closed 11 years ago

#43370 closed defect (duplicate)

dbus: 10.6 build failure (missing O_CLOEXEC)

Reported by: frozencemetery (Robbie Harwood) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: dbus

Description

As requested from #42994, here is a ticket for dbus build failure on 10.6.

This build failure is due to missing O_CLOEXEC flag to open(2) on 10.6, like so:

robbie@osxserver:~$ cat test.c
#include <fcntl.h>

#include <sys/stat.h>
#include <sys/types.h>

int main() {
  open("", O_CREAT);
  return 0;
}
robbie@osxserver:~$ gcc test.c
robbie@osxserver:~$ 

while

robbie@osxserver:~$ cat test.c
#include <fcntl.h>

#include <sys/stat.h>
#include <sys/types.h>

int main() {
  open("", O_CREAT | O_CLOEXEC);
  return 0;
}
robbie@osxserver:~$ gcc test.c
test.c: In function 'main':
test.c:7:22: error: 'O_CLOEXEC' undeclared (first use in this function)
   open("", O_CREAT | O_CLOEXEC);
                      ^
test.c:7:22: note: each undeclared identifier is reported only once for each function it appears in
robbie@osxserver:~$ 

Change History (1)

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: duplicate
Status: newclosed
Summary: 10.6 build failure (missing O_CLOEXEC)dbus: 10.6 build failure (missing O_CLOEXEC)

Duplicate of #43203 which was already fixed. Run "sudo port selfupdate" to receive the fix.

Note: See TracTickets for help on using tickets.