summaryrefslogtreecommitdiff
path: root/mbone/sdr/patches/patch-ab
blob: a3d0bf39df13e81b9f5cde7fde7c2117f6cb0d4f (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
36
37
38
39
40
41
42
43
44
$NetBSD: patch-ab,v 1.6 1999/01/01 07:58:29 garbled Exp $
--- src/sip_common.c.orig	Thu Oct  1 15:53:01 1998
+++ src/sip_common.c	Thu Dec 31 23:04:38 1998
@@ -41,6 +41,9 @@
 #include <arpa/nameser.h>
 #include <resolv.h>
 #endif
+#ifdef HAVE_SYS_INTTYPES_H
+#include <inttypes.h>
+#endif
 #include "dns.h"
 #include "prototypes.h"
 #include <sys/uio.h>
@@ -256,7 +259,7 @@
 	  len=res_mkquery(QUERY, hostname, C_IN, T_MX, NULL, NULL, 
 			  NULL, buf, 200);
 	  if (len==-1) perror("res_mkquery");
-	  len=res_send(buf, len, ans, 2000);
+	  len=res_send(buf, len, (u_char *)ans, 2000);
 	  if (len==-1) perror("res_send");
 	  ans[0]=htonl(ans[0]);
 	  ans[1]=htonl(ans[1]);
@@ -328,7 +331,8 @@
 		    } else {
 		      /*it's compressed*/
 		        if(*tstr==0) tstr+=2;
-			resstr+=dn_expand(ans, ans+len, tstr-1, resstr, 200-strlen(resstr));
+			resstr+=dn_expand((u_char *)ans, (u_char *)(ans+len),
+			    tstr-1, resstr, 200-strlen(resstr));
 			tstr+=1;
 			ctr=0;
 		    }
@@ -1238,7 +1242,11 @@
   }
   printf("clen=%d\n", clen);
   ptr=find_end_of_header(data, len);
+#ifdef HAVE_SYS_INTTYPES_H
+  printf("eoh at %x, start at %x, len: %d\n", (intptr_t)ptr, (intptr_t)data, len);
+#else
   printf("eoh at %x, start at %x, len: %d\n", (unsigned int)ptr, (unsigned int)data, len);
+#endif
   if (ptr==NULL) return 0;
   if (clen==0) return 1;
   if ((ptr-data)+clen<=len) return 1;