blob: 5a1ea3b583383f226417c16afbb54adea412ca6a (
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
|
Index: iputils/tracepath.c
===================================================================
--- iputils.orig/tracepath.c 2007-12-09 20:32:32.000000000 -0500
+++ iputils/tracepath.c 2007-12-09 20:33:20.000000000 -0500
@@ -318,9 +318,9 @@
base_port = atoi(p+1);
} else
base_port = 44444;
- he = gethostbyname(argv[0]);
+ he = gethostbyname2(argv[0], AF_INET);
if (he == NULL) {
- herror("gethostbyname");
+ herror("gethostbyname2");
exit(1);
}
memcpy(&target.sin_addr, he->h_addr, 4);
Index: iputils/ping.c
===================================================================
--- iputils.orig/ping.c 2007-12-09 20:32:59.000000000 -0500
+++ iputils/ping.c 2007-12-09 20:33:20.000000000 -0500
@@ -249,7 +249,7 @@
if (argc == 1)
options |= F_NUMERIC;
} else {
- hp = gethostbyname(target);
+ hp = gethostbyname2(target, AF_INET);
if (!hp) {
fprintf(stderr, "ping: unknown host %s\n", target);
exit(2);
|