openbsd-ports/games/gnocatan/patches/patch-server_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-server_server_c,v 1.1.1.1 2002/12/23 07:23:48 pvalchev Exp $
--- server/server.c.orig Sun Dec 22 14:38:01 2002
+++ server/server.c Sun Dec 22 14:43:59 2002
@@ -70,7 +70,7 @@ gint open_listen_socket( gint port )
g_strerror(errno));
return -1;
}
- if (bind(fd, &addr, sizeof(addr)) < 0) {
+ if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
log_message( MSG_ERROR, _("Error binding socket: %s\n"), g_strerror(errno));
return -1;
}
@@ -133,7 +133,7 @@ gint accept_connection( gint in_fd, gcha
size_t peer_len;
addr_len = sizeof(addr);
- fd = accept(in_fd, &addr, &addr_len);
+ fd = accept(in_fd, (struct sockaddr *)&addr, &addr_len);
if (fd < 0) {
log_message( MSG_ERROR, _("Error accepting connection: %s\n"),
g_strerror(errno));
@@ -142,7 +142,7 @@ gint accept_connection( gint in_fd, gcha
peer_len = sizeof(peer);
if( location ) {
- if (getpeername(fd, &peer, &peer_len) < 0) {
+ if (getpeername(fd, (struct sockaddr *)&peer, &peer_len) < 0) {
log_message( MSG_ERROR, _("Error getting peer name: %s\n"),
g_strerror(errno));
*location = _("unknown");