Summary: | Undefined CMSG_SPACE and CMSG_LEN on Solaris 9 | ||
---|---|---|---|
Product: | dbus | Reporter: | Dagobert Michelsen <dam> |
Component: | core | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | John (J5) Palmieri <johnp> |
Severity: | normal | ||
Priority: | medium | CC: | hp, smcv |
Version: | 1.4.x | Keywords: | patch |
Hardware: | SPARC | ||
OS: | Solaris | ||
URL: | http://cgit.freedesktop.org/~smcv/dbus/commit/?h=14-solaris-40235 | ||
Whiteboard: | review+ | ||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 36074 | ||
Attachments: | On Solaris, define CMSG_ALIGN, CMSG_LEN, CMSG_SPACE if undefined |
Description
Dagobert Michelsen
2011-08-19 06:49:29 UTC
A slightly better fix is posted here: http://wiki.opencsw.org/porting-faq#toc10 In the version you linked: #ifndef CMSG_ALIGN # ifdef __sun__ # define CMSG_ALIGN _CMSG_DATA_ALIGN # else # define CMSG_ALIGN(len) (((len)+sizeof(long)-1) & ~(sizeof(long)-1)) # endif #endif the _CMSG_DATA_ALIGN macro is only assumed to be present if __sun__ is defined, which (according to that porting FAQ) is only the case under gcc, and not under Sun Studio. Should we be looking for __sun there, too? I'd prefer to only enable this workaround on Solaris for the moment, unless/until someone reports that it affects some other OS. The generic code path (aligning to the next 'long' boundary) looks a bit suspicious to me - on LP64 platforms, a kernel could equally well be expecting 32-bit alignment - but I'd be OK with using it on Solaris. I'll attach a patch in a moment. Created attachment 50480 [details] [review] On Solaris, define CMSG_ALIGN, CMSG_LEN, CMSG_SPACE if undefined This patch is against dbus-1.4 but should apply equally well to master. Dago, does this look OK to you / work correctly on Solaris 9? However, I note that according to Wikipedia, Solaris 10 is 6 years old (and is the first version to work on x86-64, which seems like a reasonable milestone for "still relevant"), and Solaris *11* (Express) is nearly a year old. I'm not entirely convinced we should be merging patches to work around deficiencies of a superseded, 8 year old libc... defining subtleties of the kernel/userland cmsg interface is surely the OS's job, not ours? Yes, the patch applies cleanly and works. Thanks! Solaris 9 is still fully supported with a basic support contract and Solaris 11 has not been released at all apart from the "express" developer beta. Blaming the os vendor may be essentially right, but it doesn't help when people try to build the software. Working around os problems is not that unusual in ensuring portability :-) Fixed in git for 1.4.16 and 1.5.8, thanks |
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.