Bug 65977

Summary: Trivial fix for compilation error: contact.h:132: error: field 'address' has incomplete type
Product: Telepathy Reporter: Jasper Lievisse Adriaanse <jasper>
Component: salutAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: git master   
Hardware: Other   
OS: OpenBSD   
Whiteboard:
i915 platform: i915 features:
Attachments: Fix build as described in ticket.
Fix build as described in ticket.

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.