mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
udp: use socklen_t where appropriate rather than custom type
In particular, fixes Cygwin build where socklen_t is defined as int in line with native win32 api definition.
This commit is contained in:
parent
cb76a13cc9
commit
7def8c9b98
3 changed files with 5 additions and 13 deletions
|
@ -913,11 +913,7 @@ gst_multiudpsink_init_send (GstMultiUDPSink * sink)
|
||||||
GList *clients;
|
GList *clients;
|
||||||
GstUDPClient *client;
|
GstUDPClient *client;
|
||||||
int sndsize, ret;
|
int sndsize, ret;
|
||||||
#ifdef G_OS_WIN32
|
socklen_t len;
|
||||||
gint len;
|
|
||||||
#else
|
|
||||||
guint len;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (sink->sockfd == -1) {
|
if (sink->sockfd == -1) {
|
||||||
GST_DEBUG_OBJECT (sink, "creating sockets");
|
GST_DEBUG_OBJECT (sink, "creating sockets");
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
#define WINVER 0x0501
|
#define WINVER 0x0501
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
|
#ifndef socklen_t
|
||||||
|
#define socklen_t int
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Needed for GstObject and GST_WARNING_OBJECT */
|
/* Needed for GstObject and GST_WARNING_OBJECT */
|
||||||
#include <gst/gstobject.h>
|
#include <gst/gstobject.h>
|
||||||
|
|
|
@ -117,9 +117,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gst/netbuffer/gstnetbuffer.h>
|
#include <gst/netbuffer/gstnetbuffer.h>
|
||||||
#ifdef G_OS_WIN32
|
|
||||||
typedef int socklen_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_FIONREAD_IN_SYS_FILIO
|
#ifdef HAVE_FIONREAD_IN_SYS_FILIO
|
||||||
#include <sys/filio.h>
|
#include <sys/filio.h>
|
||||||
|
@ -778,11 +775,7 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
|
||||||
gint ret;
|
gint ret;
|
||||||
int rcvsize;
|
int rcvsize;
|
||||||
struct sockaddr_storage bind_address;
|
struct sockaddr_storage bind_address;
|
||||||
#ifdef G_OS_WIN32
|
socklen_t len;
|
||||||
gint len;
|
|
||||||
#else
|
|
||||||
guint len;
|
|
||||||
#endif
|
|
||||||
src = GST_UDPSRC (bsrc);
|
src = GST_UDPSRC (bsrc);
|
||||||
|
|
||||||
if (src->sockfd == -1) {
|
if (src->sockfd == -1) {
|
||||||
|
|
Loading…
Reference in a new issue