--- src/server.c Thu Dec 11 16:56:57 2003 +++ src/server.c Thu Dec 11 17:01:52 2003 @@ -36,12 +36,14 @@ #include #include #include + #ifdef _WIN32 #include #else -/* Check this -#include -*/ +#include +#include +#include +#include #endif /* _WIN32 */ #include #include "abyss.h" @@ -803,9 +805,18 @@ if (strlen(s->requestline)>1024-26-50) s->requestline[1024-26-50]='\0'; +#ifdef _WIN32 n=sprintf(z,"%d.%d.%d.%d - %s - [",s->conn->peerip.S_un.S_un_b.s_b1, s->conn->peerip.S_un.S_un_b.s_b2,s->conn->peerip.S_un.S_un_b.s_b3, s->conn->peerip.S_un.S_un_b.s_b4,(s->user?s->user:"")); +#else + { + char theIPString[256]; + (void) inet_ntop( AF_INET, &s->conn->peerip, theIPString, 256 ); + + n=sprintf(z,"%s - %s - [",theIPString,(s->user?s->user:"")); + } +#endif DateToLogString(&s->date,z+n);