mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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
This commit is contained in:
parent
bfb78cee42
commit
d6bd37460a
1 changed files with 10 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue