diff options
author | Siraj Razick <siraj.razick@collabora.co.uk> | 2012-02-17 20:05:42 -0500 |
---|---|---|
committer | Olli Salli <olli.salli@collabora.co.uk> | 2012-02-22 20:43:52 +0200 |
commit | fbaff05740530f3df8519ac2c37503c2d0401a2f (patch) | |
tree | c31d3a9bc6ed71fe23e2c3b5ffcc28ae8251b1dc /src/contact.h | |
parent | 8bf98188488163814ee6348d432254ff15e8690b (diff) | |
download | telepathy-salut-fbaff05740530f3df8519ac2c37503c2d0401a2f.tar.gz |
telepath-salut: Include socket headers only on Unix
Unix specific socket headers should not be included unconditionally,
since it's not supported by Windows.
Diffstat (limited to 'src/contact.h')
-rw-r--r-- | src/contact.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/contact.h b/src/contact.h index 4317a708..b2be40b1 100644 --- a/src/contact.h +++ b/src/contact.h @@ -20,7 +20,6 @@ #ifndef __SALUT_CONTACT_H__ #define __SALUT_CONTACT_H__ -#include <netinet/in.h> #include <glib-object.h> #include <telepathy-glib/handle-repo.h> @@ -32,6 +31,17 @@ #include "olpc-activity.h" #endif +#ifdef G_OS_WIN32 +#include <winsock2.h> +#include <ws2tcpip.h> +#include <windows.h> + +/* Winsock makes some inappropriately-namespaced definitions */ +#undef interface +#else +#include <netinet/in.h> +#endif + #include <wocky/wocky.h> G_BEGIN_DECLS |