From c32a99559d2826668cb891cc7aff83af587e39b0 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 31 Jan 2011 17:24:24 +0100 Subject: [PATCH] dccp: use socklen_t where appropriate rather than specific type In particular, fixes Cygwin build where socklen_t is defined as int in line with native win32 api definition. --- gst/dccp/gstdccp.c | 6 +----- gst/dccp/gstdccp_common.h | 3 +++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gst/dccp/gstdccp.c b/gst/dccp/gstdccp.c index 470c217ac0..af652f2de6 100644 --- a/gst/dccp/gstdccp.c +++ b/gst/dccp/gstdccp.c @@ -241,18 +241,14 @@ gst_dccp_server_wait_connections (GstElement * element, int server_sock_fd) /* new client */ int client_sock_fd; struct sockaddr_in client_address; - unsigned int client_address_len; + socklen_t client_address_len; memset (&client_address, 0, sizeof (client_address)); client_address_len = 0; if ((client_sock_fd = accept (server_sock_fd, (struct sockaddr *) &client_address, -#ifndef G_OS_WIN32 &client_address_len)) == -1) { -#else - (int *) &client_address_len)) == -1) { -#endif GST_ELEMENT_ERROR (element, RESOURCE, OPEN_WRITE, (NULL), ("Could not accept client on server socket %d: %s (%d)", server_sock_fd, g_strerror (errno), errno)); diff --git a/gst/dccp/gstdccp_common.h b/gst/dccp/gstdccp_common.h index 9657806183..a2c2ca2a36 100644 --- a/gst/dccp/gstdccp_common.h +++ b/gst/dccp/gstdccp_common.h @@ -32,6 +32,9 @@ # define WINVER 0x0501 # include # include +#ifndef socklen_t +#define socklen_t int +#endif #endif #include #include