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

Pavel Strashkin pavel.strashkin at gmail.com
Fri Dec 17 11:23:09 PST 2010


Got it! Thank you.

Let's wait for other comments if somebody want to say something and
after that i'll make the patch.

2010/12/17 Ralf Habacker <ralf.habacker at freenet.de>:
> 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
>
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>


More information about the dbus mailing list