summaryrefslogtreecommitdiffstats
path: root/games/maelstrom/compile_fix.diff
blob: 1ce080a5a44318224060bbb3405018b580c7bc2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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
 					);
 				}
 			}