mirror of
https://github.com/opnsense/src.git
synced 2026-06-06 15:22:34 -04:00
FreeBSD: ignore some includes when not building kernel
The function abd_alloc_from_pages() is used only in kernel. Excluding sys/vm.h, and vm/vm_page.h includes avoids dependency problems. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Martin Matuska <mm@FreeBSD.org> Closes #16616
This commit is contained in:
parent
4319e71402
commit
efeb60b86a
1 changed files with 4 additions and 0 deletions
|
|
@ -26,8 +26,10 @@
|
|||
#ifndef _ABD_OS_H
|
||||
#define _ABD_OS_H
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <sys/vm.h>
|
||||
#include <vm/vm_page.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -47,8 +49,10 @@ struct abd_linear {
|
|||
#endif
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
__attribute__((malloc))
|
||||
struct abd *abd_alloc_from_pages(vm_page_t *, unsigned long, uint64_t);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue