[Scummvm-git-logs] scummvm master -> 1d2ffda5773d88372e98831535dd210c50edb6a9

lephilousophe noreply at scummvm.org
Tue Mar 7 12:38:03 UTC 2023


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
36ccf8b29a BACKENDS: ENET: Yet another fix for AmigaOS build
673ff82b8a BACKENDS: ENET: Yet another fix for Vita build
1d2ffda577 BACKENDS: CURL: Fix build with old curl versions


Commit: 36ccf8b29a73261b5c718df27642849c6e5526b6
    https://github.com/scummvm/scummvm/commit/36ccf8b29a73261b5c718df27642849c6e5526b6
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-03-07T13:37:42+01:00

Commit Message:
BACKENDS: ENET: Yet another fix for AmigaOS build

The previous one was not complete

Changed paths:
    backends/networking/enet/source/unix.cpp


diff --git a/backends/networking/enet/source/unix.cpp b/backends/networking/enet/source/unix.cpp
index ffc0efdbfb3..b772114af8a 100644
--- a/backends/networking/enet/source/unix.cpp
+++ b/backends/networking/enet/source/unix.cpp
@@ -486,7 +486,11 @@ enet_socket_receive (ENetSocket socket,
 
     if (address != NULL)
     {
+#ifdef AMIGAOS
+        msgHdr.msg_name = (char *)& sin;
+#else
         msgHdr.msg_name = & sin;
+#endif
         msgHdr.msg_namelen = sizeof (struct sockaddr_in);
     }
 


Commit: 673ff82b8a0155ea5f5863a3e13d65613808e626
    https://github.com/scummvm/scummvm/commit/673ff82b8a0155ea5f5863a3e13d65613808e626
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-03-07T13:37:42+01:00

Commit Message:
BACKENDS: ENET: Yet another fix for Vita build

SOMAXCONN is not defined in their toolchain and a patch in their
boost package uses this value

Changed paths:
    backends/networking/enet/source/unix.cpp


diff --git a/backends/networking/enet/source/unix.cpp b/backends/networking/enet/source/unix.cpp
index b772114af8a..c6277b80e60 100644
--- a/backends/networking/enet/source/unix.cpp
+++ b/backends/networking/enet/source/unix.cpp
@@ -44,6 +44,11 @@
 #endif
 #endif
 
+// vitasdk do this in their boost package
+#if defined(__vita__) && !defined(SOMAXCONN)
+#define SOMAXCONN 4096
+#endif
+
 #ifdef HAS_FCNTL
 #include <fcntl.h>
 #else


Commit: 1d2ffda5773d88372e98831535dd210c50edb6a9
    https://github.com/scummvm/scummvm/commit/1d2ffda5773d88372e98831535dd210c50edb6a9
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-03-07T13:37:42+01:00

Commit Message:
BACKENDS: CURL: Fix build with old curl versions

Changed paths:
    backends/networking/curl/socket.cpp


diff --git a/backends/networking/curl/socket.cpp b/backends/networking/curl/socket.cpp
index 0ee8411924d..a57eb679c8d 100644
--- a/backends/networking/curl/socket.cpp
+++ b/backends/networking/curl/socket.cpp
@@ -86,13 +86,26 @@ bool CurlSocket::connect(Common::String url) {
 		}
 
 		// Get the socket, we'll need it for waiting.
+#if LIBCURL_VERSION_NUM >= 0x072d00 // 7.45.0
+		// Try first using new CURLINFO_ACTIVESOCKET
 		res = curl_easy_getinfo(_easy, CURLINFO_ACTIVESOCKET, &_socket);
-		if (res != CURLE_OK) {
-			warning("libcurl: Failed to extract socket: %s", curl_easy_strerror(res));
-			return false;
+		if (res == CURLE_OK) {
+			return true;
+		}
+#endif
+
+		// Fallback on old and deprecated CURLINFO_LASTSOCKET
+		long socket;
+		res = curl_easy_getinfo(_easy, CURLINFO_LASTSOCKET, &socket);
+		if (res == CURLE_OK) {
+			// curl_socket_t is an int or a SOCKET (Win32) which is a UINT_PTR
+			// A cast should be safe enough as long fits in it
+			_socket = (curl_socket_t)socket;
+			return true;
 		}
 
-		return true;
+		warning("libcurl: Failed to extract socket: %s", curl_easy_strerror(res));
+		return false;
 	}
 	return false;
 }




More information about the Scummvm-git-logs mailing list