Skip to content

Commit

Permalink
FreeBSD: exclude some includes when building libsa
Browse files Browse the repository at this point in the history
The function abd_alloc_from_pages() is not used in FreeBSD base libsa.
Excluding sys/vm.h, and vm/vm_page.h includes avoids dependency
problems.

Signed-off-by: Martin Matuska <[email protected]>
  • Loading branch information
mmatuska committed Oct 7, 2024
1 parent e8f0aa1 commit ef71376
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/os/freebsd/zfs/sys/abd_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
#ifndef _ABD_OS_H
#define _ABD_OS_H

#ifndef IN_LIBSA
#include <sys/vm.h>
#include <vm/vm_page.h>
#endif

#ifdef __cplusplus
extern "C" {
Expand All @@ -47,8 +49,10 @@ struct abd_linear {
#endif
};

#ifndef IN_LIBSA
__attribute__((malloc))
struct abd *abd_alloc_from_pages(vm_page_t *, unsigned long, uint64_t);
#endif

#ifdef __cplusplus
}
Expand Down

0 comments on commit ef71376

Please sign in to comment.