summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippo Della Betta <filippo.dellabetta@telecomitalia.it>2012-03-05 18:04:57 +0100
committerYouness Alaoui <youness.alaoui@collabora.co.uk>2012-03-05 21:01:23 -0500
commit15f92eee4963b732ebcc319aae14d155da465f78 (patch)
tree79d13b5244cd670454884a98c434a64627289d6d
parent476500db4a9e2fdf4d0ac2127ef257a352c64b86 (diff)
Fixed mingw/msys compilation. Definition for intptr_t was missing. Added WSAStartup/WSACleanup on win32
-rw-r--r--tests/test-restart.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test-restart.c b/tests/test-restart.c
index 03c8e87..737bc0e 100644
--- a/tests/test-restart.c
+++ b/tests/test-restart.c
@@ -41,6 +41,7 @@
#include <stdlib.h>
#include <string.h>
+#include <io.h>
static NiceComponentState global_lagent_state = NICE_COMPONENT_STATE_LAST;
static NiceComponentState global_ragent_state = NICE_COMPONENT_STATE_LAST;
@@ -393,6 +394,11 @@ int main (void)
guint timer_id;
const char *stun_server = NULL, *stun_server_port = NULL;
+#ifdef G_OS_WIN32
+ WSADATA w;
+
+ WSAStartup(0x0202, &w);
+#endif
g_type_init ();
#if !GLIB_CHECK_VERSION(2,31,8)
g_thread_init(NULL);
@@ -466,6 +472,8 @@ int main (void)
global_mainloop = NULL;
g_source_remove (timer_id);
-
+#ifdef G_OS_WIN32
+ WSACleanup();
+#endif
return result;
}