diff options
author | Siraj Razick <siraj.razick@collabora.co.uk> | 2012-01-26 16:20:04 -0500 |
---|---|---|
committer | Siraj Razick <siraj.razick@collabora.co.uk> | 2012-01-26 17:32:47 -0500 |
commit | 8a4afe112d4a61ffe9fa0fd629dd92fdc90e68b7 (patch) | |
tree | 8622b14ed939cedfb83367c9a94e115cf5b7dfd8 | |
parent | 97a5823f03850f70bbd1da12af1364adc925e494 (diff) |
Fix warnings from wocky-connector-test.c under mingw32
In windows socket API setsockopt takes a const char * as the fourth
parameter, while on Linux it takes a void * so we cast to
const char * which will work under both the platforms. This patch
also move flags veriable in client_connected to the unix part of the
ifdef, to remove warnings which shows up with mingw32.
-rw-r--r-- | tests/wocky-connector-test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/wocky-connector-test.c b/tests/wocky-connector-test.c index 624a551..7476540 100644 --- a/tests/wocky-connector-test.c +++ b/tests/wocky-connector-test.c @@ -3142,2 +3142,4 @@ client_connected (GIOChannel *channel, u_long mode = 0; +#else + long flags; #endif @@ -3145,3 +3147,2 @@ client_connected (GIOChannel *channel, GSocketConnection *gconn; - long flags; @@ -3201,3 +3202,3 @@ start_dummy_xmpp_server (test_t *test) ssock = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); - setsockopt (ssock, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof (reuse)); + setsockopt (ssock, SOL_SOCKET, SO_REUSEADDR, (const char *) &reuse, sizeof (reuse)); |