UNIX FD passing is supported by Solaris, but additional compile flags are required

Ralf Habacker ralf.habacker at freenet.de
Fri Dec 17 07:52:04 PST 2010


Am 17.12.2010 11:25, schrieb Pavel Strashkin:
> Hello,
>
> I'm trying to compile dbus 1.4.0 under Solaris and it fails with an
> error like this: "struct msghdr has no msg_controll member...".
> The answer on this question is there:
> http://stackoverflow.com/questions/1034587/how-does-xpg4-2-and-other-defines-work-on-solaris
>
> Passing UNIX FD was introduced in X/Open CAE Specification, Issue 4,
> Version 2 (XPG4v2) so you need to enable it at compile time.
> I've added "-D_XOPEN_SOURCE=500" and everything compiles without any error.
If would be nice to have a patch (best would be git format-patch) with  
the required change in the build system probably configure.in. I guess 
the related line will starts with

case $host_os in
     solaris*)

for example In configure.in line 553ff there is the following code

# Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris
#
case $host_os in
     solaris*)
        CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" ;;
esac

in which the additional define may be addable.

BTW: in line 1309 the above mentioned code is duplicated - not sure if 
this is required or not

# Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris
#
case $host_os in
     solaris*)
        CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" ;;
esac

May be the solaris case(s) could be cleaned up a bit.

Regards
  Ralf



More information about the dbus mailing list