From f02d86e2690ee65eeff5820aedb31b3c2d0b614b Mon Sep 17 00:00:00 2001 From: Matthew D Fleming Date: Thu, 12 Aug 2010 16:54:43 +0000 Subject: [PATCH] Fix compile. It seemed better to have memguard.c include opt_vm.h in case future compile-time knobs were added that it wants to use. Also add include guards and forward declarations to vm/memguard.h. Approved by: zml (mentor) MFC after: 1 month --- sys/vm/memguard.c | 2 ++ sys/vm/memguard.h | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/sys/vm/memguard.c b/sys/vm/memguard.c index 61485ab1edc7..c3d93e06200d 100644 --- a/sys/vm/memguard.c +++ b/sys/vm/memguard.c @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); * See the memguard(9) man page for more information on using MemGuard. */ +#include "opt_vm.h" + #include #include #include diff --git a/sys/vm/memguard.h b/sys/vm/memguard.h index 55ffec918242..ba7c2f1b4272 100644 --- a/sys/vm/memguard.h +++ b/sys/vm/memguard.h @@ -26,8 +26,14 @@ * $FreeBSD$ */ +#ifndef _VM_MEMGUARD_H_ +#define _VM_MEMGUARD_H_ + #include "opt_vm.h" +struct malloc_type; +struct vm_map; + #ifdef DEBUG_MEMGUARD unsigned long memguard_fudge(unsigned long, unsigned long); void memguard_init(struct vm_map *); @@ -43,3 +49,5 @@ int is_memguard_addr(void *); #define memguard_cmp(mtp, size) 0 #define is_memguard_addr(addr) 0 #endif + +#endif /* _VM_MEMGUARD_H_ */