summaryrefslogtreecommitdiffstats
path: root/usr.sbin/httpd/src/support/logresolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/httpd/src/support/logresolve.c')
-rw-r--r--usr.sbin/httpd/src/support/logresolve.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/usr.sbin/httpd/src/support/logresolve.c b/usr.sbin/httpd/src/support/logresolve.c
index 2e02e3a80f0..f6c86953500 100644
--- a/usr.sbin/httpd/src/support/logresolve.c
+++ b/usr.sbin/httpd/src/support/logresolve.c
@@ -44,7 +44,7 @@
#include <ctype.h>
-#ifndef MPE
+#if !defined(MPE) && !defined(WIN32)
#ifndef BEOS
#include <arpa/inet.h>
#else
@@ -52,7 +52,7 @@
#include <netinet/in.h>
#define NO_ADDRESS 4
#endif /* BEOS */
-#endif /* MPE */
+#endif /* !MPE && !WIN32*/
static void cgethost(struct in_addr ipnum, char *string, int check);
static int getline(char *s, int n);
@@ -105,7 +105,7 @@ struct nsrec {
extern int h_errno; /* some machines don't have this in their headers */
#endif
-/* largeste value for h_errno */
+/* largest value for h_errno */
#define MAX_ERR (NO_ADDRESS)
#define UNKNOWN_ERR (MAX_ERR+1)
#define NO_REVERSE (MAX_ERR+2)
@@ -280,6 +280,11 @@ int main (int argc, char *argv[])
char *bar, hoststring[MAXDNAME + 1], line[MAXLINE], *statfile;
int i, check;
+#ifdef WIN32
+ WSADATA wsaData;
+ WSAStartup(0x101, &wsaData);
+#endif
+
check = 0;
statfile = NULL;
for (i = 1; i < argc; i++) {
@@ -335,6 +340,10 @@ int main (int argc, char *argv[])
puts(hoststring);
}
+#ifdef WIN32
+ WSACleanup();
+#endif
+
if (statfile != NULL) {
FILE *fp;
fp = fopen(statfile, "w");