mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
68 lines
2.3 KiB
Diff
68 lines
2.3 KiB
Diff
diff -Naur Maelstrom-3.0.6.orig/Maelstrom-netd.c Maelstrom-3.0.6/Maelstrom-netd.c
|
|
--- Maelstrom-3.0.6.orig/Maelstrom-netd.c 2000-02-12 04:58:59.000000000 -0500
|
|
+++ Maelstrom-3.0.6/Maelstrom-netd.c 2016-07-30 18:49:48.254076062 -0400
|
|
@@ -9,8 +9,11 @@
|
|
#include <sys/time.h>
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
|
+#include <arpa/inet.h>
|
|
#include <netdb.h>
|
|
#include <unistd.h>
|
|
+#include <stdlib.h>
|
|
+#include <time.h>
|
|
|
|
/* We wait in a loop for players to connect and tell us how many people
|
|
are playing. Then, once all players have connected, then we broadcast
|
|
@@ -181,7 +184,7 @@
|
|
exit(sig);
|
|
}
|
|
|
|
-main(int argc, char *argv[])
|
|
+int main(int argc, char *argv[])
|
|
{
|
|
int netfd, i, slot;
|
|
struct sockaddr_in serv_addr;
|
|
@@ -201,7 +204,7 @@
|
|
memset(&serv_addr, 0, sizeof(serv_addr));
|
|
serv_addr.sin_family = AF_INET;
|
|
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
|
|
- serv_addr.sin_port = htons(NETPLAY_PORT-1);
|
|
+ serv_addr.sin_port = htons(NETPLAY_PORT - 1);
|
|
if (bind(netfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {
|
|
perror("Can't bind local address");
|
|
exit(3);
|
|
diff -Naur Maelstrom-3.0.6.orig/netlogic/netplay.cpp Maelstrom-3.0.6/netlogic/netplay.cpp
|
|
--- Maelstrom-3.0.6.orig/netlogic/netplay.cpp 2002-10-20 00:11:52.000000000 -0400
|
|
+++ Maelstrom-3.0.6/netlogic/netplay.cpp 2016-07-30 18:34:07.295131706 -0400
|
|
@@ -128,7 +128,7 @@
|
|
if ( port ) {
|
|
portnum = atoi(port);
|
|
} else {
|
|
- portnum = NETPLAY_PORT+playernum;
|
|
+ portnum = NETPLAY_PORT + playernum;
|
|
}
|
|
if ( host ) {
|
|
/* Resolve the remote address */
|
|
@@ -183,7 +183,7 @@
|
|
if ( port ) {
|
|
portnum = atoi(port);
|
|
} else {
|
|
- portnum = NETPLAY_PORT-1;
|
|
+ portnum = NETPLAY_PORT - 1;
|
|
}
|
|
SDLNet_ResolveHost(&ServAddr, host, portnum);
|
|
if ( ServAddr.host == INADDR_NONE ) {
|
|
diff -Naur Maelstrom-3.0.6.orig/screenlib/SDL_FrameBuf.cpp Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp
|
|
--- Maelstrom-3.0.6.orig/screenlib/SDL_FrameBuf.cpp 2001-07-22 17:03:13.000000000 -0400
|
|
+++ Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp 2016-07-30 18:18:37.043186717 -0400
|
|
@@ -848,8 +848,8 @@
|
|
for ( i=0; i<dirtymaplen; ++i ) {
|
|
if ( dirtymap[i] != NULL ) {
|
|
dirtymap[i] = (SDL_Rect *)(
|
|
- ((int)dirtymap[i]-(int)updatelist) +
|
|
- (int)newlist
|
|
+ ((long)dirtymap[i]-(long)updatelist) +
|
|
+ (long)newlist
|
|
);
|
|
}
|
|
}
|