From d6bd37460a58a8ca53c093ca51f8786aa05ed800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Sat, 15 Mar 2014 20:21:32 +0000 Subject: [PATCH] rtspconnection: Silence a compiler warning Cast the argument into (const char *) on W32, as winsock2 expects it. https://bugzilla.gnome.org/show_bug.cgi?id=726433 --- gst-libs/gst/rtsp/gstrtspconnection.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index 241e7818d4..d077885529 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -2645,14 +2645,22 @@ set_qos_dscp (GSocket * socket, guint qos_dscp) /* extract and shift 6 bits of the DSCP */ tos = (qos_dscp & 0x3f) << 2; +#ifdef G_OS_WIN32 +# define SETSOCKOPT_ARG4_TYPE const char * +#else +# define SETSOCKOPT_ARG4_TYPE const void * +#endif + switch (af) { case AF_INET: - if (setsockopt (fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0) + if (setsockopt (fd, IPPROTO_IP, IP_TOS, (SETSOCKOPT_ARG4_TYPE) &tos, + sizeof (tos)) < 0) goto no_setsockopt; break; case AF_INET6: #ifdef IPV6_TCLASS - if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof (tos)) < 0) + if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, + (SETSOCKOPT_ARG4_TYPE) &tos, sizeof (tos)) < 0) goto no_setsockopt; break; #endif