From nobody Thu Jul 18 16:14:37 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPyYn4SR4z5RgXq; Thu, 18 Jul 2024 16:14:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPyYn2qxmz4MJ0; Thu, 18 Jul 2024 16:14:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721319277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o+s9HUkf389AiSWDLKWFMRUT/mRmA3IwvSiBFKRuVCE=; b=tQWbotBqE0mkHPI6gW8tP5zoeWtlD+E8tP5Yeo3ntAaFY32h8EvJgt4M/iUiV/JFqUeRIq /fjkRkhYaApM8XTDRKVxVCNR35WahLUb9UWz9XbbsLHm/gtdXNh2wq2qd4UDU0Es08l1Vv 5svZo8rKqQ/DuewcCOjM/svWt7/A17G/BlsKDts5F8R8HdOTDVbjiwb3Nv20qQsAmKgCUj clL470LqXKuDRmcjMiWRxIP8ve8/u8xIngwnHw+1apUDx1IoJ5hsgAmf36ubYyLf6X+e2+ h9MAUF7QbDv8MGVNCgn32hFNW5TZR2AGpbBNvTmdKgEFA1eBwGv+GvmRkGJ+Vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721319277; a=rsa-sha256; cv=none; b=bpPzbwlhj03d5oG75R8yrNO6iadmiPvLj7BKnel+Egy0AyYr8lC1RoM0aGy2Nh5b9aHzpn j8W0LXEeCck2ntzbeFNsujs3KBodOrd1Dt6ux3KiPk257MzD5dZmuGLnSKOvozibLUK1VJ PuqPUATYzgmjATnNjSDsvOW23vMOhg3G05tHty/xlzbYeiWG2i3o+Bk9zl52t5kfRfRXZn E4h7MkJI/VaPsZ5/bYEEBt9hYWwx5G2Oscrzt0FVh26HeS7gSnR015VceSujCyJN3TO/5k Vf3owbgtjU/g6KQyC6QkZiCU7b4+xV31sA5kuwy4drZctinCIxKCnqAq5PPuFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721319277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o+s9HUkf389AiSWDLKWFMRUT/mRmA3IwvSiBFKRuVCE=; b=c90MVf4LFpoeoJ5p4s83mirPhJShLKGlwX/v2omm8qnDr2DAQf806ZngWzpKZzgxDF8FEX 9ZRYCSJr01jRIcuLJYlVMUZjErSshODxsNbtwGMUCyE2NX7HPTNOD/clAZOuF4uxOFfGRr sq3NAfb1xr4zMHEAS+2cIn6fwGB/Z1OjBL4be+a/47Oi48D1nYYgbKTWqTSp3a1szHHdGs s0l1iLmhKeEP3Qg7UYXpn80bYVOJ6H6BOwLQ/PGRl3GjHt9I9zoUwvLm8cNIzZIvEyEEFt P4xHJqFj0oB+Z87NaUCFsW856E7Wtzku1cWQPTCFAt8+fGka7ZgN9nAgNn0HDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WPyYn2Q2Yzv9s; Thu, 18 Jul 2024 16:14:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46IGEbjx057693; Thu, 18 Jul 2024 16:14:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46IGEbZS057690; Thu, 18 Jul 2024 16:14:37 GMT (envelope-from git) Date: Thu, 18 Jul 2024 16:14:37 GMT Message-Id: <202407181614.46IGEbZS057690@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dmitry Marakasov Subject: git: d86e9f39581e - main - games/simutrans: Fix build after net/miniupnpc API breakage List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: amdmi3 X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d86e9f39581e4e5cc1fa972b05ddb5d04c20a43e Auto-Submitted: auto-generated The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=d86e9f39581e4e5cc1fa972b05ddb5d04c20a43e commit d86e9f39581e4e5cc1fa972b05ddb5d04c20a43e Author: Dmitry Marakasov AuthorDate: 2024-07-18 15:12:31 +0000 Commit: Dmitry Marakasov CommitDate: 2024-07-18 16:14:33 +0000 games/simutrans: Fix build after net/miniupnpc API breakage --- games/simutrans/files/patch-upnp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/games/simutrans/files/patch-upnp b/games/simutrans/files/patch-upnp new file mode 100644 index 000000000000..38267818dc2c --- /dev/null +++ b/games/simutrans/files/patch-upnp @@ -0,0 +1,34 @@ +From upstream commit b399b9c89b3369ebe3a9afa54459f74c9c5f52b1 + +diff --git src/simutrans/network/network.cc src/simutrans/network/network.cc +index 5acf10e5c7..52669ad9d0 100644 +--- src/simutrans/network/network.cc ++++ src/simutrans/network/network.cc +@@ -981,7 +981,12 @@ bool prepare_for_server( char *externalIPAddress, char *externalAltIPAddress, in + struct UPNPUrls urls; + struct IGDdatas data; + ++#if MINIUPNPC_API_VERSION <= 17 + UPNP_GetValidIGD( devlist, &urls, &data, lanaddr, sizeof(lanaddr) ); ++#else ++ char wanaddr[64] = "uset"; ++ UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr), wanaddr, sizeof(lanaddr)); ++#endif + // we must know our IP address first + if( UPNP_GetExternalIPAddress(urls.controlURL, data.first.servicetype, externalIPAddress) == UPNPCOMMAND_SUCCESS ) { + // this is our ID (at least the routes tells us this) +@@ -1040,7 +1045,13 @@ void remove_port_forwarding( int port ) + struct UPNPUrls urls; + struct IGDdatas data; + +- UPNP_GetValidIGD( devlist, &urls, &data, lanaddr, sizeof(lanaddr) ); ++#if MINIUPNPC_API_VERSION <= 17 ++ UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr)); ++#else ++ char wanaddr[64] = "uset"; ++ UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr), wanaddr, sizeof(lanaddr)); ++#endif ++ + // we must know our IP address first + if( UPNP_GetExternalIPAddress(urls.controlURL, data.first.servicetype, externalIPAddress) == UPNPCOMMAND_SUCCESS ) { + // this is our ID (at least the routes tells us this)