mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-03 11:12:13 +00:00
Import change from upstream to fix build after net/miniupnp update. [1]
While here also mark BROKEN on 9.x, due to gcc crashing during the build. PR: 203983 [1] Submitted by: monwarez at mailoo.org
This commit is contained in:
parent
1e9abb7f8e
commit
66478f6866
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=400109
@ -2,7 +2,7 @@
|
||||
|
||||
PORTNAME= 0ad
|
||||
PORTVERSION= 0.0.18
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= SF/zero-ad/releases
|
||||
DISTFILES= ${PORTNAME}-${PORTVERSION}-alpha-unix-build.tar.xz \
|
||||
@ -46,6 +46,10 @@ PORTDATA= *
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} < 1000024
|
||||
BROKEN= segfaults during build
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
|
||||
-e 's|%%CC%%|${CC}|' \
|
||||
|
19
games/0ad/files/patch-source_network_NetServer.cpp
Normal file
19
games/0ad/files/patch-source_network_NetServer.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
--- source/network/NetServer.cpp.orig 2015-01-24 14:46:52 UTC
|
||||
+++ source/network/NetServer.cpp
|
||||
@@ -228,6 +228,7 @@ void* CNetServerWorker::SetupUPnP(void*)
|
||||
|
||||
int ret = 0;
|
||||
bool allocatedUrls = false;
|
||||
+ int error = 0; // Set this for upnpDiscover
|
||||
|
||||
// Try a cached URL first
|
||||
if (!rootDescURL.empty() && UPNP_GetIGDFromUrl(rootDescURL.c_str(), &urls, &data, internalIPAddress, sizeof(internalIPAddress)))
|
||||
@@ -236,7 +237,7 @@ void* CNetServerWorker::SetupUPnP(void*)
|
||||
ret = 1;
|
||||
}
|
||||
// No cached URL, or it did not respond. Try getting a valid UPnP device for 10 seconds.
|
||||
- else if ((devlist = upnpDiscover(10000, 0, 0, 0, 0, 0)) != NULL)
|
||||
+ else if ((devlist = upnpDiscover(10000, 0, 0, 0, 0, 0,&error)) != NULL)
|
||||
{
|
||||
ret = UPNP_GetValidIGD(devlist, &urls, &data, internalIPAddress, sizeof(internalIPAddress));
|
||||
allocatedUrls = ret != 0; // urls is allocated on non-zero return values
|
Loading…
x
Reference in New Issue
Block a user