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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
https://bugs.gentoo.org/715246
--- a/client/net.c
+++ b/client/net.c
@@ -20,6 +20,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
+#include <stdint.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
@@ -69,7 +70,7 @@ int netinit(char *hostname, int port) {
}
net_raddr.sin_family = AF_INET;
net_raddr.sin_port = htons(port);
- net_raddr.sin_addr.s_addr = *((u_int32_t *) host->h_addr);
+ net_raddr.sin_addr.s_addr = *((uint32_t *) host->h_addr);
return(s);
}
--- a/server/bcast.c
+++ b/server/bcast.c
@@ -21,6 +21,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
+#include <stdint.h>
#include "../common/port.h"
#include "timer.h"
@@ -75,11 +76,11 @@ int b_init(void) {
addr.sin_family = AF_INET;
addr.sin_port = htons(BROADCASTPORT_D);
- addr.sin_addr.s_addr = (u_int32_t) INADDR_ANY;
+ addr.sin_addr.s_addr = (uint32_t) INADDR_ANY;
baddr.sin_family = AF_INET;
baddr.sin_port = htons(BROADCASTPORT_C);
- baddr.sin_addr.s_addr = (u_int32_t) INADDR_BROADCAST;
+ baddr.sin_addr.s_addr = (uint32_t) INADDR_BROADCAST;
if(bind(b_sock, (struct sockaddr *) &addr, sizeof(struct sockaddr_in)) == -1)
return(-1);
--- a/server/local.c
+++ b/server/local.c
@@ -21,6 +21,7 @@
#include <unistd.h>
#include <mad.h>
#include <stdio.h>
+#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
@@ -207,7 +208,7 @@ int l_init(void) {
addr.sin_family = AF_INET;
addr.sin_port = htons(LISTENPORT);
- addr.sin_addr.s_addr = (u_int32_t) INADDR_ANY;
+ addr.sin_addr.s_addr = (uint32_t) INADDR_ANY;
if(bind(*s, (struct sockaddr *) &addr, sizeof(struct sockaddr_in)) == -1)
return(-1);
--- a/streamer/streamer.c
+++ b/streamer/streamer.c
@@ -25,6 +25,7 @@
#include <sys/socket.h>
#include <unistd.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -129,7 +130,7 @@ int main(int argc, char *argv[]) {
}
addr.sin_family = AF_INET;
addr.sin_port = htons(LISTENPORT);
- addr.sin_addr.s_addr = (u_int32_t) htonl(INADDR_LOOPBACK);
+ addr.sin_addr.s_addr = (uint32_t) htonl(INADDR_LOOPBACK);
if(connect(s, (struct sockaddr *) &addr, sizeof(struct sockaddr_in)) == -1) {
perror("Failed to connect to localhost:5555");
|