]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - lhnet.c
fix errors and warnings in MSVC when compiling as C++
[xonotic/darkplaces.git] / lhnet.c
diff --git a/lhnet.c b/lhnet.c
index 492074b43413e0235cfc9abce1c925d8910a8c61..7da46a74ecf2a799aa3ad99078cf8a0710308f81 100644 (file)
--- a/lhnet.c
+++ b/lhnet.c
@@ -728,7 +728,7 @@ lhnetsocket_t *LHNET_OpenSocket_Connectionless(lhnetaddress_t *address)
                                                int ipv6_only = 1;
                                                if (address->addresstype != LHNETADDRESSTYPE_INET6
                                                        || setsockopt (lhnetsocket->inetsocket, IPPROTO_IPV6, IPV6_V6ONLY,
-                                                                                  (const void *)&ipv6_only, sizeof(ipv6_only)) == 0
+                                                                                  (const char *)&ipv6_only, sizeof(ipv6_only)) == 0
 #ifdef WIN32
                                                        // The Win32 API only supports IPV6_V6ONLY since Windows Vista, but fortunately
                                                        // the default value is what we want on Win32 anyway (IPV6_V6ONLY = true)