openbsd-ports/games/gnocatan/patches/patch-meta-server_gnocatan-meta-server_c
pvalchev 31d037532c Initial import of gnocatan-0.6.1
Gnocatan is an Internet playable implementation of the Settlers of Catan
board game.  The aim is to remain as faithful to the board game as is
possible.

From Jim Geovedi <jim@corebsd.or.id>
2002-12-23 07:23:48 +00:00

31 lines
1.1 KiB
Plaintext

$OpenBSD: patch-meta-server_gnocatan-meta-server_c,v 1.1.1.1 2002/12/23 07:23:48 pvalchev Exp $
--- meta-server/gnocatan-meta-server.c.orig Sun Dec 22 14:44:49 2002
+++ meta-server/gnocatan-meta-server.c Sun Dec 22 14:45:15 2002
@@ -313,7 +313,7 @@ static gchar *get_peer_name(gint fd)
socklen_t peer_len;
peer_len = sizeof(peer);
- if (getpeername(fd, &peer, &peer_len) < 0)
+ if (getpeername(fd, (struct sockaddr *)&peer, &peer_len) < 0)
syslog(LOG_ERR, "getting peer name: %m");
else {
struct hostent *host_ent;
@@ -452,7 +452,7 @@ static void accept_new_client()
Client *client;
addr_len = sizeof(addr);
- fd = accept(accept_fd, &addr, &addr_len);
+ fd = accept(accept_fd, (struct sockaddr *)&addr, &addr_len);
if (fd < 0) {
syslog(LOG_ERR, "accepting connection: %m");
return;
@@ -592,7 +592,7 @@ static gboolean setup_accept_sock(gint p
syslog(LOG_ERR, "creating socket: %m");
return FALSE;
}
- if (bind(accept_fd, &addr, sizeof(addr)) < 0) {
+ if (bind(accept_fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
syslog(LOG_ERR, "binding socket: %m");
return FALSE;
}