Bug 22888

Summary: compile issues on OSX in current master (HEAD)
Product: dbus Reporter: Benjamin Reed <ranger>
Component: coreAssignee: Thiago Macieira <thiago>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Mac OS X (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: check for unix FD passing
F_DUPFD_CLOEXEC check was reversed

Description Benjamin Reed 2009-07-22 05:52:57 UTC
Created attachment 27913 [details] [review]
check for unix FD passing

On OSX, building current master, I get:

libtool: compile:  gcc-4.2 -DHAVE_CONFIG_H -I. -I/Users/ranger/rcs/dbus/dbus -I.. -I.. -I/Users/ranger/rcs/dbus -fPIC -DDBUS_COMPILATION -DDBUS_MACHINE_UUID_FILE=\"/sw/var/lib/dbus/machine-id\" -DDBUS_SYSTEM_CONFIG_FILE=\"/sw/etc/dbus-1/system.conf\" -DDBUS_SESSION_CONFIG_FILE=\"/sw/etc/dbus-1/session.conf\" -g -O2 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -fno-common -Wno-unused -Wno-sign-compare -Wno-pointer-sign -Wno-format -fno-strict-aliasing -MT dbus-message.lo -MD -MP -MF .deps/dbus-message.Tpo -c /Users/ranger/rcs/dbus/dbus/dbus-message.c  -fno-common -DPIC -o .libs/dbus-message.o
/Users/ranger/rcs/dbus/dbus/dbus-message.c: In function ‘dbus_message_contains_unix_fds’:
/Users/ranger/rcs/dbus/dbus/dbus-message.c:3633: error: ‘DBusMessage’ has no member named ‘n_unix_fds’


...if I fix that, I then get:

libtool: compile:  gcc-4.2 -DHAVE_CONFIG_H -I. -I/Users/ranger/rcs/dbus/dbus -I.. -I.. -I/Users/ranger/rcs/dbus -fPIC -DDBUS_COMPILATION -DDBUS_MACHINE_UUID_FILE=\"/sw/var/lib/dbus/machine-id\" -DDBUS_SYSTEM_CONFIG_FILE=\"/sw/etc/dbus-1/system.conf\" -DDBUS_SESSION_CONFIG_FILE=\"/sw/etc/dbus-1/session.conf\" -g -O2 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -fno-common -Wno-unused -Wno-sign-compare -Wno-pointer-sign -Wno-format -fno-strict-aliasing -MT dbus-sysdeps-unix.lo -MD -MP -MF .deps/dbus-sysdeps-unix.Tpo -c /Users/ranger/rcs/dbus/dbus/dbus-sysdeps-unix.c  -fno-common -DPIC -o .libs/dbus-sysdeps-unix.o
/Users/ranger/rcs/dbus/dbus/dbus-sysdeps-unix.c: In function ‘_dbus_dup’:
/Users/ranger/rcs/dbus/dbus/dbus-sysdeps-unix.c:3047: error: ‘cloexec_done’ undeclared (first use in this function)
/Users/ranger/rcs/dbus/dbus/dbus-sysdeps-unix.c:3047: error: (Each undeclared identifier is reported only once
/Users/ranger/rcs/dbus/dbus/dbus-sysdeps-unix.c:3047: error: for each function it appears in.)


For the first, it looks like it just needs to be surrounded by a check for HAVE_UNIX_FD_PASSING, for the latter, it appears the #ifndef should be an #ifdef instead?

I've attached 2 patches for these issues.  master builds with these changes, for me.
Comment 1 Benjamin Reed 2009-07-22 05:53:25 UTC
Created attachment 27914 [details] [review]
F_DUPFD_CLOEXEC check was reversed
Comment 2 Thiago Macieira 2009-07-29 10:08:28 UTC
Both patches look fine. I'll apply them.

Doesn't Mac have file descriptor passing too?
Comment 3 Benjamin Reed 2009-07-29 10:13:25 UTC
Probably, I didn't investigate whether the tests could have enabled such things on osx, only that it failed when I tried to compile as I always do...

I'll look into seeing if it's easy to enable.
Comment 4 Thiago Macieira 2009-07-29 10:14:28 UTC
Patches applied.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.