mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
freebsd: changes necessary to coexist with dtrace in tree
Fix header conflicts when building zfs with openzfs as a vendor import. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10497
This commit is contained in:
@@ -160,11 +160,13 @@ extern "C" {
|
||||
#define KMALLOC_MAX_SIZE MAXPHYS
|
||||
|
||||
#ifdef _KERNEL
|
||||
#if !defined(LOCORE) && !defined(_ASM)
|
||||
typedef unsigned long long u_longlong_t;
|
||||
typedef long long longlong_t;
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
typedef void zfs_kernel_param_t;
|
||||
#endif
|
||||
#define param_set_charp(a, b) (0)
|
||||
#define ATTR_UID AT_UID
|
||||
#define ATTR_GID AT_GID
|
||||
@@ -179,6 +181,9 @@ typedef void zfs_kernel_param_t;
|
||||
#define MUTEX_NOLOCKDEP 0
|
||||
#define RW_NOLOCKDEP 0
|
||||
|
||||
#if !defined(LOCORE) && !defined(_ASM)
|
||||
#include <sys/param.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#if __FreeBSD_version < 1300051
|
||||
#define vm_page_valid(m) (m)->valid = VM_PAGE_BITS_ALL
|
||||
@@ -207,7 +212,6 @@ typedef void zfs_kernel_param_t;
|
||||
#else
|
||||
#define getnewvnode_reserve_() getnewvnode_reserve(1)
|
||||
#endif
|
||||
|
||||
struct hlist_node {
|
||||
struct hlist_node *next, **pprev;
|
||||
};
|
||||
@@ -288,7 +292,7 @@ atomic_dec(atomic_t *v)
|
||||
{
|
||||
return (atomic_fetchadd_int(&v->counter, -1) - 1);
|
||||
}
|
||||
|
||||
#endif
|
||||
#else
|
||||
typedef long loff_t;
|
||||
typedef long rlim64_t;
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <sys/spl_condvar.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/kmem.h>
|
||||
|
||||
/*
|
||||
* cv_timedwait() is similar to cv_wait() except that it additionally expects
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#ifndef _OPENSOLARIS_SYS_FILE_H_
|
||||
#define _OPENSOLARIS_SYS_FILE_H_
|
||||
|
||||
#include <sys/refcount.h>
|
||||
#include_next <sys/refcount.h>
|
||||
#include_next <sys/file.h>
|
||||
|
||||
#define FKIOCTL 0x80000000 /* ioctl addresses are from kernel */
|
||||
|
||||
@@ -31,8 +31,9 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include_next <sys/mount.h>
|
||||
#ifdef BUILDING_ZFS
|
||||
#include <sys/vfs.h>
|
||||
|
||||
#endif
|
||||
#define MS_FORCE MNT_FORCE
|
||||
#define MS_REMOUNT MNT_UPDATE
|
||||
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
#include <sys/uio.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/u8_textprep.h>
|
||||
#ifdef BUILDING_ZFS
|
||||
#include <sys/vnode.h>
|
||||
#endif
|
||||
|
||||
typedef int ddi_devid_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user