From edb9087c05097bd29e3afc8da68cc77422a4cb71 Mon Sep 17 00:00:00 2001 From: tron <tron@NetBSD.org> Date: Sat, 1 Feb 2003 21:12:25 +0000 Subject: [PATCH] Include "sys/mallocvar.h" with "_KERNEL" defined in time to avoid build failure because MALLOC_DECLARE() is not defined. --- lib/libkvm/kvm_file.c | 9 ++++++--- libexec/identd/netbsd.c | 20 +++++++++++--------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/libkvm/kvm_file.c b/lib/libkvm/kvm_file.c index 25a23a792926..076c8f38f3b4 100644 --- a/lib/libkvm/kvm_file.c +++ b/lib/libkvm/kvm_file.c @@ -1,4 +1,4 @@ -/* $NetBSD: kvm_file.c,v 1.20 2003/02/01 17:22:44 tron Exp $ */ +/* $NetBSD: kvm_file.c,v 1.21 2003/02/01 21:12:27 tron Exp $ */ /*- * Copyright (c) 1989, 1992, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)kvm_file.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: kvm_file.c,v 1.20 2003/02/01 17:22:44 tron Exp $"); +__RCSID("$NetBSD: kvm_file.c,v 1.21 2003/02/01 21:12:27 tron Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -51,12 +51,15 @@ __RCSID("$NetBSD: kvm_file.c,v 1.20 2003/02/01 17:22:44 tron Exp $"); #include <sys/param.h> #define _KERNEL -#include <sys/file.h> +#include <sys/mallocvar.h> #undef _KERNEL #include <sys/user.h> #include <sys/lwp.h> #include <sys/proc.h> #include <sys/exec.h> +#define _KERNEL +#include <sys/file.h> +#undef _KERNEL #include <sys/stat.h> #include <sys/ioctl.h> #include <sys/tty.h> diff --git a/libexec/identd/netbsd.c b/libexec/identd/netbsd.c index c3c2b166e9cf..49ddde216c15 100644 --- a/libexec/identd/netbsd.c +++ b/libexec/identd/netbsd.c @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd.c,v 1.13 2003/02/01 17:59:47 tron Exp $ */ +/* $NetBSD: netbsd.c,v 1.14 2003/02/01 21:12:25 tron Exp $ */ /* ** netbsd.c Low level kernel access functions for NetBSD @@ -11,6 +11,11 @@ ** Please send bug fixes/bug reports to: Peter Eriksson <pen@lysator.liu.se> */ +#include <sys/types.h> +#define _KERNEL +#include <sys/mallocvar.h> +#undef _KERNEL + #include <stdio.h> #include <stdlib.h> #include <errno.h> @@ -23,14 +28,6 @@ #include "kvm.h" -#include <sys/types.h> - -#define _KERNEL - -#include <sys/file.h> - -#undef _KERNEL - #include <sys/stat.h> #include <sys/param.h> #include <sys/ioctl.h> @@ -38,6 +35,11 @@ #include <sys/socketvar.h> +#define _KERNEL + +#include <sys/file.h> + +#undef _KERNEL #include <sys/sysctl.h> #include <fcntl.h>