summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pppstats/pppstats.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pppstats/pppstats.c')
-rw-r--r--usr.sbin/pppstats/pppstats.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.sbin/pppstats/pppstats.c b/usr.sbin/pppstats/pppstats.c
index cabaced..018277a 100644
--- a/usr.sbin/pppstats/pppstats.c
+++ b/usr.sbin/pppstats/pppstats.c
@@ -26,7 +26,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: pppstats.c,v 1.4 1994/06/08 00:38:49 paulus Exp $";
+static char rcsid[] = "$Id: pppstats.c,v 1.1.1.1 1994/11/12 06:07:15 lars Exp $";
#endif
#include <ctype.h>
@@ -79,7 +79,7 @@ extern off_t lseek();
char *kmemf;
-#if defined(sun) || defined(__FreeBSD__)
+#if defined(sun) || defined(BSD4_4)
#include <kvm.h>
kvm_t *kd;
#define KDARG kd,
@@ -196,12 +196,18 @@ main(argc, argv)
perror("kvm_open");
exit(1);
}
-#else
- /* BSD4.3+ */
+#elif defined(BSD4_4)
+ /* BSD4.4+ */
if ((kd = kvm_openfiles(system, kmemf, NULL, O_RDONLY, errbuf)) == NULL) {
fprintf(stderr, "kvm_openfiles: %s", errbuf);
exit(1);
}
+#else
+ /* BSD4.3+ */
+ if (kvm_openfiles(system, kmemf, (char *)0) == -1) {
+ fprintf(stderr, "kvm_openfiles: %s", kvm_geterr());
+ exit(1);
+ }
#endif
if (kvm_nlist(KDARG nl)) {
OpenPOWER on IntegriCloud