blob: 7e69975178a7cba334b602cfa9cf9a984175ea5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
$NetBSD: patch-ac,v 1.2 2007/06/18 19:00:22 minskim Exp $
--- Head.c.orig 2002-11-21 23:38:03.000000000 -0800
+++ Head.c
@@ -1,7 +1,7 @@
#define _XOPEN_SOURCE 500
-
+#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
@@ -30,7 +30,6 @@
#include "Misc.h"
-extern int errno;
extern int h_errno;
@@ -55,7 +54,7 @@ void http_head_req(struct request *req)
hstrerror(h_errno));
exit(1);
}
- strncpy(req->ip, inet_ntoa(*(struct in_addr *)he->h_addr), MAXIPSIZ);
+ strncpy(req->ip, inet_ntoa(*(struct in_addr *)he->h_addr_list[0]), MAXIPSIZ);
time(&t_start);
|