summaryrefslogtreecommitdiff
path: root/net/mtr/patches/patch-ab
blob: 25bf03dc6a48b68de12f3a8bcc39be23816cac9e (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
31
32
33
34
35
$NetBSD: patch-ab,v 1.7 2005/02/01 16:53:58 wiz Exp $

--- dns.c.orig	Thu Aug 26 00:56:53 2004
+++ dns.c	Sun Jan  9 16:06:08 2005
@@ -32,9 +32,18 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+
+#ifdef __APPLE__
+#include <arpa/nameser8_compat.h>
+#else
 #include <arpa/nameser.h>
+#endif
 #include <netdb.h>
+#ifdef __APPLE__
+#include <resolv8_compat.h>
+#else
 #include <resolv.h>
+#endif
 #include <unistd.h>
 #include <fcntl.h>
 #include <ctype.h>
@@ -814,9 +823,9 @@
 {
   packetheader *hp;
   int r,i;
-  int buf[(MaxPacketsize/sizeof (int))+1];
+  unsigned char buf[MaxPacketsize];
 
-  r = res_mkquery(QUERY,s,C_IN,type,NULL,0,NULL,(unsigned char*)buf,MaxPacketsize);
+  r = res_mkquery(QUERY,s,C_IN,type,NULL,0,NULL,buf,MaxPacketsize);
   if (r == -1) {
     restell("Resolver error: Query too large.");
     return;