diff options
author | Cy Schubert <cy@FreeBSD.org> | 2010-06-13 15:28:43 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2010-06-13 15:28:43 +0000 |
commit | 62558dfa80abb04561daf3de1763116985244e7d (patch) | |
tree | db247c6d37c6186cba1143f3fa09c64bcea42ff1 /net/tcpview/files/patch-print_nfs.c | |
parent | Update to 3.7.1 (diff) |
Fix 8.X build errors.
Take on maintainership of this port.
Diffstat (limited to 'net/tcpview/files/patch-print_nfs.c')
-rw-r--r-- | net/tcpview/files/patch-print_nfs.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/net/tcpview/files/patch-print_nfs.c b/net/tcpview/files/patch-print_nfs.c index 2bee0e9ef466..045edcf9adf1 100644 --- a/net/tcpview/files/patch-print_nfs.c +++ b/net/tcpview/files/patch-print_nfs.c @@ -1,5 +1,5 @@ ---- print-nfs.c.orig Thu Apr 22 22:40:18 1993 -+++ print-nfs.c Thu Feb 13 18:53:20 2003 +--- print-nfs.c.orig 1993-04-22 13:40:18.000000000 -0700 ++++ print-nfs.c 2010-06-13 08:09:51.000000000 -0700 @@ -38,10 +38,10 @@ #include <sys/time.h> #include <errno.h> @@ -12,7 +12,7 @@ #include <rpc/rpc_msg.h> #include <ctype.h> -@@ -54,9 +54,15 @@ +@@ -54,9 +54,21 @@ /* These must come after interface.h for BSD. */ #if BSD >= 199006 #include <sys/ucred.h> @@ -23,14 +23,29 @@ +#define NFSPROC_ROOT ((unsigned long)(3)) +#define NFSPROC_STATFS ((unsigned long)(17)) + ++#if defined(__FreeBSD_version) && __FreeBSD_version >= 800100 ++#include <fs/nfs/nfsport.h> ++#include <fs/nfs/rpcv2.h> ++#include <fs/nfs/nfsproto.h> ++#else +#include <nfs/rpcv2.h> +#include <nfs/nfsproto.h> ++#endif #endif -#include <nfs/nfs.h> #include "addrtoname.h" #include "extract.h" -@@ -250,11 +256,13 @@ +@@ -170,7 +182,7 @@ + + /* Fetch string length; convert to host order */ + len = *dp++; +- NTOHL(len); ++ ntohl(len); + + cp = (u_char *)dp; + /* Update long pointer (NFS filenames are padded to long) */ +@@ -250,11 +262,13 @@ return; break; @@ -44,7 +59,7 @@ case RFS_LOOKUP: printf(" lookup"); if ((dp = parsereq(rp, length)) != 0 && parsefhn(dp) != 0) -@@ -277,7 +285,7 @@ +@@ -277,7 +291,7 @@ return; } break; @@ -53,7 +68,7 @@ #if RFS_WRITECACHE != NFSPROC_NOOP case RFS_WRITECACHE: printf(" writecache"); -@@ -291,6 +299,7 @@ +@@ -291,6 +305,7 @@ } break; #endif |