Bug 32540 - DBus 1.4.1 does not compile on Solaris
Summary: DBus 1.4.1 does not compile on Solaris
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.4.x
Hardware: Other Solaris
: medium normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-20 20:00 UTC by Brian Cameron
Modified: 2011-01-05 15:13 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch fixing problem (1.44 KB, patch)
2010-12-20 20:00 UTC, Brian Cameron
Details | Splinter Review

Description Brian Cameron 2010-12-20 20:00:10 UTC
Created attachment 41328 [details] [review]
patch fixing problem

The dbus-sysdeps-unix.c file does not compile on Solaris with the Sun Studio compiler since MSG_NOSIGNAL does not exist.  The configure script correctly notices that it does not exist and sets MSG_NOSIGNAL to 0.  However the #ifdef's
don't filter out the code so I see errors like this:

pkgbuild: "dbus-sysdeps-unix.c", line 217: undefined symbol: MSG_NOSIGNAL
pkgbuild: "dbus-sysdeps-unix.c", line 448: undefined symbol: MSG_NOSIGNAL
pkgbuild: "dbus-sysdeps-unix.c", line 521: undefined symbol: MSG_NOSIGNAL
pkgbuild: "dbus-sysdeps-unix.c", line 1506: undefined symbol: MSG_NOSIGNAL

The attached patch fixes this by testing if the value is actually 1.
Comment 1 Colin Walters 2011-01-05 15:13:54 UTC
Your use of #ifdef looks totally wrong to me; should be #if, no?  Anyways this should have been fixed by:


commit 56d8d4f58ee60cd4f860a99a2dd47b3f636321b8
Author: Will Thompson <will.thompson@collabora.co.uk>
Date:   Fri Dec 24 14:40:49 2010 +0000

    connection: correct HAVE_DECL_MSG_NOSIGNAL guard
    
    Helpfully, AC_CHECK_DECLS (which configure.in uses to define
    HAVE_DECL_MSG_NOSIGNAL) behaves differently to every similar AC_CHECK_*
    macro and, rather than producing #undef HAVE_DECL_MSG_NOSIGNAL if the
    given symbol is not found, instead produces #define
    HAVE_DECL_MSG_NOSIGNAL 0.
    
    Mike McQuaid's patch fixes the uses of this constant in sysdeps-unix;
    with this patch, all code is guarded consistently and correctly.


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.