summaryrefslogtreecommitdiff
path: root/security/nfsbug/patches/patch-ac
blob: 07d033520d6c58ddc97752f7f35e3f185b8a13bb (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
$NetBSD: patch-ac,v 1.6 2007/01/03 03:26:31 minskim Exp $

--- nfsbug.c.orig	1995-02-16 21:57:27.000000000 -0800
+++ nfsbug.c
@@ -14,6 +14,7 @@
  *	- close sockets (?)
  */
 #include <stdio.h>
+#include <string.h>
 #include <ctype.h>
 #include <netdb.h>
 #include <errno.h>
@@ -25,18 +26,24 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#include <sys/sysmacros.h>
 #include <sys/time.h>
 #include <sys/vnode.h>
-#include <sys/vfs.h>
-#include <sys/sysmacros.h>
+#include <sys/mount.h>
 #ifdef SVR4
 #include <sys/inode.h>
 #else
 #ifndef HPUX
+#if defined(__NetBSD__) || defined(__APPLE__)
+#include <ufs/ufs/dinode.h>
+#  if __NetBSD_Version__ >= 200040000
+     /* at some point, fsid_t's "val" member was renamed to __fsid_val - HF */
+#    define val __fsid_val
+#  endif
+#else
 #include <ufs/inode.h>
 #endif
 #endif
+#endif
 
 #include "mount.h"
 #include "nfs_prot.h"
@@ -240,7 +247,7 @@ nfsbug(host)
     } else
 	proto = "TCP/IP";
 
-    clnt_control(mntclient, CLSET_TIMEOUT, &timeout);
+    clnt_control(mntclient, CLSET_TIMEOUT, (char *)&timeout);
     mntclient->cl_auth = create_unix_auth(0, 0);
     if (mntclient->cl_auth == NULL) {
 	clnt_destroy(mntclient);
@@ -277,7 +284,7 @@ nfsbug(host)
     } else
 	proto = "TCP/IP";
 
-    clnt_control(nfsclient, CLSET_TIMEOUT, &timeout);
+    clnt_control(nfsclient, CLSET_TIMEOUT, (char *)&timeout);
     nfsclient->cl_auth = create_unix_auth(-2, -2); /* well known uid, gid */
     if (nfsclient->cl_auth == NULL) {
 	clnt_destroy(nfsclient);