date and time created 83/02/11 15:44:29 by rrh
[unix-history] / usr / src / usr.bin / netstat / main.c
index 765b9e2..89ccb30 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)main.c     4.3 82/12/05";
+static char sccsid[] = "@(#)main.c     4.5 83/02/09";
 #endif
 
 #include <sys/param.h>
 #endif
 
 #include <sys/param.h>
-#include <sys/pte.h>
+#include <machine/pte.h>
 #include <ctype.h>
 #include <errno.h>
 #include <netdb.h>
 #include <ctype.h>
 #include <errno.h>
 #include <netdb.h>
@@ -226,8 +226,10 @@ klseek(fd, base, off)
 
        if (kflag) {
                /* get kernel pte */
 
        if (kflag) {
                /* get kernel pte */
+#ifdef vax
                base &= 0x7fffffff;
                base &= 0x7fffffff;
-               base = Sysmap[base >> 9].pg_pfnum * 512 + (base & 0x1ff);
+#endif
+               base = ctob(Sysmap[btoc(base)].pg_pfnum) + (base & (NBPG-1));
        }
        lseek(fd, base, off);
 }
        }
        lseek(fd, base, off);
 }