- Fix build after net/enet update

- While here, make MAKE_JOBS_SAFE
This commit is contained in:
Dmitry Marakasov 2009-12-18 02:44:30 +00:00
parent 16c510212d
commit 50cc805efc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=246102
3 changed files with 33 additions and 0 deletions

View File

@ -24,6 +24,7 @@ USE_GMAKE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}_source/src
CFLAGS+= -fsigned-char
ALL_TARGET= #empty
MALE_JOBS_SAFE= yes
OPTIONS= CLIENT "Build client" on \
DEDICATED "Build dedicated server" on \

View File

@ -0,0 +1,11 @@
--- serverbrowser.cpp.orig 2004-05-09 19:20:40.000000000 +0400
+++ serverbrowser.cpp 2009-12-18 05:07:23.000000000 +0300
@@ -268,7 +268,7 @@
{
if(pingsock == ENET_SOCKET_NULL)
{
- pingsock = enet_socket_create(ENET_SOCKET_TYPE_DATAGRAM, NULL);
+ pingsock = enet_socket_create(ENET_SOCKET_TYPE_DATAGRAM);
resolverinit(1, 1000);
};
resolverclear();

View File

@ -0,0 +1,21 @@
--- serverms.cpp.orig 2005-08-11 06:02:46.000000000 +0400
+++ serverms.cpp 2009-12-18 05:09:20.000000000 +0300
@@ -13,7 +13,7 @@
if(ad.host==ENET_HOST_ANY) return;
};
if(mssock!=ENET_SOCKET_NULL) enet_socket_destroy(mssock);
- mssock = enet_socket_create(ENET_SOCKET_TYPE_STREAM, NULL);
+ mssock = enet_socket_create(ENET_SOCKET_TYPE_STREAM);
if(mssock==ENET_SOCKET_NULL) { printf("could not open socket\n"); return; };
if(enet_socket_connect(mssock, &ad)<0) { printf("could not connect\n"); return; };
ENetBuffer buf;
@@ -135,7 +135,8 @@
if(listen)
{
ENetAddress address = { ENET_HOST_ANY, CUBE_SERVINFO_PORT };
- pongsock = enet_socket_create(ENET_SOCKET_TYPE_DATAGRAM, &address);
+ pongsock = enet_socket_create(ENET_SOCKET_TYPE_DATAGRAM);
if(pongsock == ENET_SOCKET_NULL) fatal("could not create server info socket\n");
+ if(enet_socket_bind(pongsock, &address) == -1) fatal("cannot bind server info socket\n");
};
};