[vlc-commits] Win32: don't call setsockopt if compiling for Windows 8.0

Jean-Baptiste Kempf git at videolan.org
Fri Mar 20 15:50:53 CET 2015


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Mar 20 15:47:04 2015 +0100| [448290d5350749a13c042fd8323496cbc5e58060] | committer: Jean-Baptiste Kempf

Win32: don't call setsockopt if compiling for Windows 8.0

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=448290d5350749a13c042fd8323496cbc5e58060
---

 src/network/udp.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/network/udp.c b/src/network/udp.c
index d33b13a..72bd346 100644
--- a/src/network/udp.c
+++ b/src/network/udp.c
@@ -104,6 +104,7 @@ static int net_SetupDgramSocket (vlc_object_t *p_obj, int fd,
      * SetSocketMediaStreamingMode is present in win 8 and later, so we set
      * receive buffer if that isn't present
      */
+#if _WIN32_WINNT < 0x602
     HINSTANCE h_Network = LoadLibraryW(L"Windows.Networking.dll");
     if( (h_Network == NULL) ||
         (GetProcAddress( h_Network, "SetSocketMediaStreamingMode" ) == NULL ) )
@@ -113,6 +114,7 @@ static int net_SetupDgramSocket (vlc_object_t *p_obj, int fd,
     }
     if( h_Network )
         FreeLibrary( h_Network );
+#endif
 
     if (net_SockAddrIsMulticast (ptr->ai_addr, ptr->ai_addrlen)
      && (sizeof (struct sockaddr_storage) >= ptr->ai_addrlen))



More information about the vlc-commits mailing list