summaryrefslogtreecommitdiff
path: root/mbone/sdr/patches/patch-ad
blob: 65e4fb1091a99a3568ff80f39aa949b4dea1f6c3 (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
--- src/sd_listen.c.orig	Thu Jan  8 20:39:21 1998
+++ src/sd_listen.c	Fri Oct  2 08:30:50 1998
@@ -316,11 +316,19 @@
 
 	if (strncmp(k1, "k=", 2)==0)
 	  {
+#ifdef HAVE_SYS_INTTYPES_H
+	    if ((uintptr_t)k2>=(uintptr_t)k1+2)
+	      {
+		memcpy(key, k1+2, (uintptr_t)k2-((uintptr_t)k1+1));
+		key[(uintptr_t)k2-((uintptr_t)k1+1)]='\0';
+	      }
+#else
 	    if ((u_int)k2>=(u_int)k1+2)
 	      {
 		memcpy(key, k1+2, (u_int)k2-((u_int)k1+1));
 		key[(u_int)k2-((u_int)k1+1)]='\0';
 	      }
+#endif
 	    else
 	      {
 		key[0]='\0';
@@ -648,7 +656,11 @@
     struct timeval tv;
     unsigned long src, hfrom;
     char *data;
+#ifdef HAVE_SYS_INTTYPES_H
+    intptr_t ix = rfd2sock[PTOI(fd)];
+#else
     int ix = rfd2sock[PTOI(fd)];
+#endif
 
     fromlen=sizeof(struct sockaddr);