Bug 65977 - Trivial fix for compilation error: contact.h:132: error: field 'address' has incomplete type
Summary: Trivial fix for compilation error: contact.h:132: error: field 'address' has ...
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: salut (show other bugs)
Version: git master
Hardware: Other OpenBSD
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-20 18:14 UTC by Jasper Lievisse Adriaanse
Modified: 2013-06-24 13:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Fix build as described in ticket. (738 bytes, patch)
2013-06-20 18:16 UTC, Jasper Lievisse Adriaanse
Details | Splinter Review
Fix build as described in ticket. (946 bytes, patch)
2013-06-24 12:57 UTC, Jasper Lievisse Adriaanse
Details | Splinter Review

Description Jasper Lievisse Adriaanse 2013-06-20 18:14:58 UTC
sys/socket.h isn't included in contact.h; sys/socket.h defines the type for sockaddr_storage as defined by POSIX (http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html). 

This patch fixes the build on OpenBSD and probably other systems too where netinet/in.h doesn't include sys/socket.h.
Comment 1 Jasper Lievisse Adriaanse 2013-06-20 18:16:05 UTC
Created attachment 81126 [details] [review]
Fix build as described in ticket.
Comment 2 Simon McVittie 2013-06-24 12:35:32 UTC
Replacing the #ifdef G_OS_WIN32...#endif with #include <gibber/gibber-sockets.h>, which encapsulates the whole mess, would be better: it deals with various other awkward header-order things, such as Darwin.

Using GSocketAddress instead of struct sockaddr would be better still, although a rather larger patch.
Comment 3 Jasper Lievisse Adriaanse 2013-06-24 12:56:57 UTC
Thanks for your feedback, that approach works fine on OpenBSD too; I'll update the patch.
Comment 4 Jasper Lievisse Adriaanse 2013-06-24 12:57:27 UTC
Created attachment 81336 [details] [review]
Fix build as described in ticket.
Comment 5 Simon McVittie 2013-06-24 13:37:46 UTC
Fixed in git for 0.9.0, 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.