commit:     ff42a016463d45c91ab20d7292cba881e5270b85
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 12 15:03:18 2025 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Fri Sep 12 15:54:03 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff42a016

app-emulation/virtualbox: fix build with net-misc/curl-8.16

Closes: https://bugs.gentoo.org/962744
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 .../files/virtualbox-7.2.2-curl-8.16.patch         | 54 ++++++++++++++++++++++
 app-emulation/virtualbox/virtualbox-7.2.2.ebuild   |  2 +
 2 files changed, 56 insertions(+)

diff --git a/app-emulation/virtualbox/files/virtualbox-7.2.2-curl-8.16.patch 
b/app-emulation/virtualbox/files/virtualbox-7.2.2-curl-8.16.patch
new file mode 100644
index 000000000000..6a1d401cca98
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-7.2.2-curl-8.16.patch
@@ -0,0 +1,54 @@
+Breaking change in curl 8.16:
+https://github.com/curl/curl/commit/1a12663d06d9c42fd40a8655d5247f7afeeb8e1e
+
+Change curl_proxytype to long.
+
+See also: https://bugs.gentoo.org/962744
+
+--- a/src/VBox/Runtime/generic/http-curl.cpp
++++ b/src/VBox/Runtime/generic/http-curl.cpp
+@@ -188,7 +188,7 @@
+     /** Proxy port number (UINT32_MAX if not specified). */
+     uint32_t            uProxyPort;
+     /** The proxy type (CURLPROXY_HTTP, CURLPROXY_SOCKS5, ++). */
+-    curl_proxytype      enmProxyType;
++    long      enmProxyType;
+     /** Proxy username (RTStrFree). */
+     char               *pszProxyUsername;
+     /** Proxy password (RTStrFree). */
+@@ -591,7 +591,7 @@
+  * @param   pszUsername     The proxy username, or NULL if none.
+  * @param   pszPassword     The proxy password, or NULL if none.
+  */
+-static int rtHttpUpdateProxyConfig(PRTHTTPINTERNAL pThis, curl_proxytype 
enmProxyType, const char *pszHost,
++static int rtHttpUpdateProxyConfig(PRTHTTPINTERNAL pThis, long enmProxyType, 
const char *pszHost,
+                                    uint32_t uPort, const char *pszUsername, 
const char *pszPassword)
+ {
+     CURLcode rcCurl;
+@@ -610,7 +610,7 @@
+     if (   pThis->fReapplyProxyInfo
+         || enmProxyType != pThis->enmProxyType)
+     {
+-        rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_PROXYTYPE, 
(long)enmProxyType);
++        rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_PROXYTYPE, 
enmProxyType);
+         AssertMsgReturn(CURL_SUCCESS(rcCurl), ("CURLOPT_PROXYTYPE=%d: %d 
(%#x)\n", enmProxyType, rcCurl, rcCurl),
+                         VERR_HTTP_CURL_PROXY_CONFIG);
+         pThis->enmProxyType = enmProxyType;
+@@ -871,7 +871,7 @@
+             char    *pszPassword = RTUriParsedAuthorityPassword(pszProxyUrl, 
&Parsed);
+             uint32_t uProxyPort  = RTUriParsedAuthorityPort(pszProxyUrl, 
&Parsed);
+             bool     fUnknownProxyType = false;
+-            curl_proxytype enmProxyType;
++            long enmProxyType;
+             if (RTUriIsSchemeMatch(pszProxyUrl, "http"))
+             {
+                 enmProxyType  = CURLPROXY_HTTP;
+@@ -1352,7 +1352,7 @@
+      * Determine the proxy type (not entirely sure about type == proxy type 
and
+      * not scheme/protocol)...
+      */
+-    curl_proxytype  enmProxyType      = CURLPROXY_HTTP;
++    long  enmProxyType      = CURLPROXY_HTTP;
+     uint32_t        uDefaultProxyPort = 8080;
+     if (   CFEqual(hStrProxyType, kCFProxyTypeHTTP)
+         || CFEqual(hStrProxyType, kCFProxyTypeHTTPS))

diff --git a/app-emulation/virtualbox/virtualbox-7.2.2.ebuild 
b/app-emulation/virtualbox/virtualbox-7.2.2.ebuild
index 7ce2201827a7..33c7f7fe1e8f 100644
--- a/app-emulation/virtualbox/virtualbox-7.2.2.ebuild
+++ b/app-emulation/virtualbox/virtualbox-7.2.2.ebuild
@@ -200,6 +200,8 @@ REQUIRED_USE="
 PATCHES=(
        # Downloaded patchset
        "${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
+
+       "${FILESDIR}"/${P}-curl-8.16.patch
 )
 
 pkg_pretend() {

Reply via email to