]> git.pond.sub.org Git - empserver/blobdiff - src/lib/player/accept.c
Update copyright notice.
[empserver] / src / lib / player / accept.c
index 7c2141cfc4e4a812593957bcc59dcd4328fdf38f..ba2ca2e9b272504347dbf9367fd93f638de2f267 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2000, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -44,6 +44,7 @@
 #include "optlist.h"
 
 #if !defined(_WIN32)
+#include <arpa/inet.h>
 #include <sys/socket.h>
 #include <sys/wait.h>
 #include <sys/time.h>
@@ -73,7 +74,9 @@ struct player *
 player_new(int s, struct sockaddr_in *sin)
 {
     struct player *lp;
+#ifdef RESOLVE_IPADDRESS
     struct hostent *hostp;
+#endif
 
     lp = (struct player *)malloc(sizeof(struct player));
     if (!lp)
@@ -191,7 +194,7 @@ player_wakeup(struct player *pl)
 
 /*ARGSUSED*/
 void
-player_accept(void *argv)
+player_accept(void *unused)
 {
     struct sockaddr_in sin;
     struct servent *sp;
@@ -199,7 +202,7 @@ player_accept(void *argv)
     short port;
     int val;
     struct player *np;
-    socklen_t len;
+    int len;
     int ns;
     int set = 1;
     int stacksize;
@@ -226,8 +229,7 @@ player_accept(void *argv)
        exit(1);
     }
 #else
-    logerror
-       ("Alpha/Linux?  You don't support SO_REUSEADDR yet, do you?\n");
+    logerror("Alpha/Linux?  You don't support SO_REUSEADDR yet, do you?\n");
 #endif
     if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
        logerror("inet socket bind");