aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/freebsd
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2020-07-25 20:09:50 -0700
committerGitHub <[email protected]>2020-07-25 20:09:50 -0700
commite64cc4954c7862db6a6b4dc978a091ebc3f870da (patch)
treec4338faa05d73ed93d55b4a775edf93ab15e99f7 /module/os/freebsd
parent6d8da84106de1fc8480e1758cc88e81393b4c0c2 (diff)
Refactor ccompile.h to not include system headers
This is a step toward being able to vendor the OpenZFS code in FreeBSD. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #10625
Diffstat (limited to 'module/os/freebsd')
-rw-r--r--module/os/freebsd/spl/callb.c2
-rw-r--r--module/os/freebsd/spl/spl_acl.c1
-rw-r--r--module/os/freebsd/spl/spl_cmn_err.c3
-rw-r--r--module/os/freebsd/spl/spl_dtrace.c1
-rw-r--r--module/os/freebsd/spl/spl_kmem.c1
-rw-r--r--module/os/freebsd/spl/spl_kstat.c1
-rw-r--r--module/os/freebsd/spl/spl_misc.c1
-rw-r--r--module/os/freebsd/spl/spl_policy.c1
-rw-r--r--module/os/freebsd/spl/spl_string.c1
-rw-r--r--module/os/freebsd/spl/spl_sunddi.c1
-rw-r--r--module/os/freebsd/spl/spl_sysevent.c1
-rw-r--r--module/os/freebsd/spl/spl_taskq.c1
-rw-r--r--module/os/freebsd/spl/spl_uio.c2
-rw-r--r--module/os/freebsd/spl/spl_vfs.c3
-rw-r--r--module/os/freebsd/spl/spl_vm.c1
-rw-r--r--module/os/freebsd/spl/spl_zlib.c1
-rw-r--r--module/os/freebsd/spl/spl_zone.c1
-rw-r--r--module/os/freebsd/zfs/abd_os.c1
-rw-r--r--module/os/freebsd/zfs/dmu_os.c3
-rw-r--r--module/os/freebsd/zfs/zfs_ctldir.c4
-rw-r--r--module/os/freebsd/zfs/zfs_dir.c2
21 files changed, 31 insertions, 2 deletions
diff --git a/module/os/freebsd/spl/callb.c b/module/os/freebsd/spl/callb.c
index 633e85bc0..fffa85b6b 100644
--- a/module/os/freebsd/spl/callb.c
+++ b/module/os/freebsd/spl/callb.c
@@ -23,8 +23,8 @@
* Use is subject to license terms.
*/
-#include <sys/param.h>
#include <sys/types.h>
+#include <sys/param.h>
#include <sys/time.h>
#include <sys/sysmacros.h>
#include <sys/systm.h>
diff --git a/module/os/freebsd/spl/spl_acl.c b/module/os/freebsd/spl/spl_acl.c
index bb4c30728..18188ca0a 100644
--- a/module/os/freebsd/spl/spl_acl.c
+++ b/module/os/freebsd/spl/spl_acl.c
@@ -27,6 +27,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/types.h>
diff --git a/module/os/freebsd/spl/spl_cmn_err.c b/module/os/freebsd/spl/spl_cmn_err.c
index 23566603f..22c7338b7 100644
--- a/module/os/freebsd/spl/spl_cmn_err.c
+++ b/module/os/freebsd/spl/spl_cmn_err.c
@@ -25,6 +25,9 @@
* Copyright 2012 Martin Matuska <[email protected]>. All rights reserved.
*/
+#include <sys/cdefs.h>
+#include <sys/param.h>
+#include <sys/systm.h>
#include <sys/cmn_err.h>
void
diff --git a/module/os/freebsd/spl/spl_dtrace.c b/module/os/freebsd/spl/spl_dtrace.c
index e7b2ff823..6b2872bcc 100644
--- a/module/os/freebsd/spl/spl_dtrace.c
+++ b/module/os/freebsd/spl/spl_dtrace.c
@@ -29,6 +29,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
#include <sys/param.h>
#include <sys/queue.h>
#include <sys/sdt.h>
diff --git a/module/os/freebsd/spl/spl_kmem.c b/module/os/freebsd/spl/spl_kmem.c
index af3747c27..cfc61dd7f 100644
--- a/module/os/freebsd/spl/spl_kmem.c
+++ b/module/os/freebsd/spl/spl_kmem.c
@@ -27,6 +27,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
#include <sys/param.h>
#include <sys/byteorder.h>
#include <sys/kernel.h>
diff --git a/module/os/freebsd/spl/spl_kstat.c b/module/os/freebsd/spl/spl_kstat.c
index 234b56a49..756667045 100644
--- a/module/os/freebsd/spl/spl_kstat.c
+++ b/module/os/freebsd/spl/spl_kstat.c
@@ -27,6 +27,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
diff --git a/module/os/freebsd/spl/spl_misc.c b/module/os/freebsd/spl/spl_misc.c
index 8d33916d8..0354b986c 100644
--- a/module/os/freebsd/spl/spl_misc.c
+++ b/module/os/freebsd/spl/spl_misc.c
@@ -27,6 +27,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
#include <sys/param.h>
#include <sys/jail.h>
#include <sys/kernel.h>
diff --git a/module/os/freebsd/spl/spl_policy.c b/module/os/freebsd/spl/spl_policy.c
index 8ef4ca88b..5cd5c69ef 100644
--- a/module/os/freebsd/spl/spl_policy.c
+++ b/module/os/freebsd/spl/spl_policy.c
@@ -27,6 +27,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
#include <sys/param.h>
#include <sys/priv.h>
#include <sys/vnode.h>
diff --git a/module/os/freebsd/spl/spl_string.c b/module/os/freebsd/spl/spl_string.c
index 14d816b5c..d13b64b4c 100644
--- a/module/os/freebsd/spl/spl_string.c
+++ b/module/os/freebsd/spl/spl_string.c
@@ -25,6 +25,7 @@
* Use is subject to license terms.
*/
+#include <sys/types.h>
#include <sys/param.h>
#include <sys/string.h>
#include <sys/kmem.h>
diff --git a/module/os/freebsd/spl/spl_sunddi.c b/module/os/freebsd/spl/spl_sunddi.c
index 1fa4f56f1..ebec77bdb 100644
--- a/module/os/freebsd/spl/spl_sunddi.c
+++ b/module/os/freebsd/spl/spl_sunddi.c
@@ -27,6 +27,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
#include <sys/param.h>
#include <sys/jail.h>
#include <sys/kernel.h>
diff --git a/module/os/freebsd/spl/spl_sysevent.c b/module/os/freebsd/spl/spl_sysevent.c
index 4bb0658c8..53520eeaf 100644
--- a/module/os/freebsd/spl/spl_sysevent.c
+++ b/module/os/freebsd/spl/spl_sysevent.c
@@ -28,6 +28,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
diff --git a/module/os/freebsd/spl/spl_taskq.c b/module/os/freebsd/spl/spl_taskq.c
index f32dad2a2..9cdf93ea9 100644
--- a/module/os/freebsd/spl/spl_taskq.c
+++ b/module/os/freebsd/spl/spl_taskq.c
@@ -29,6 +29,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kmem.h>
diff --git a/module/os/freebsd/spl/spl_uio.c b/module/os/freebsd/spl/spl_uio.c
index 05dbfd06d..c6b610394 100644
--- a/module/os/freebsd/spl/spl_uio.c
+++ b/module/os/freebsd/spl/spl_uio.c
@@ -40,7 +40,7 @@
* $FreeBSD$
*/
-#include <sys/types.h>
+#include <sys/param.h>
#include <sys/uio.h>
#include <sys/vnode.h>
diff --git a/module/os/freebsd/spl/spl_vfs.c b/module/os/freebsd/spl/spl_vfs.c
index 99da8c976..d42835c20 100644
--- a/module/os/freebsd/spl/spl_vfs.c
+++ b/module/os/freebsd/spl/spl_vfs.c
@@ -27,6 +27,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
@@ -40,6 +41,8 @@ __FBSDID("$FreeBSD$");
#include <sys/mutex.h>
#include <sys/vnode.h>
+#include <sys/ccompat.h>
+
MALLOC_DECLARE(M_MOUNT);
void
diff --git a/module/os/freebsd/spl/spl_vm.c b/module/os/freebsd/spl/spl_vm.c
index 9f7acab74..b5649d519 100644
--- a/module/os/freebsd/spl/spl_vm.c
+++ b/module/os/freebsd/spl/spl_vm.c
@@ -27,6 +27,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
#include <sys/param.h>
#include <sys/byteorder.h>
#include <sys/lock.h>
diff --git a/module/os/freebsd/spl/spl_zlib.c b/module/os/freebsd/spl/spl_zlib.c
index 4d53f42d3..079801f2d 100644
--- a/module/os/freebsd/spl/spl_zlib.c
+++ b/module/os/freebsd/spl/spl_zlib.c
@@ -28,6 +28,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
#include <sys/kmem.h>
#include <sys/kmem_cache.h>
#include <sys/zmod.h>
diff --git a/module/os/freebsd/spl/spl_zone.c b/module/os/freebsd/spl/spl_zone.c
index 40f21934e..0b3b04d2a 100644
--- a/module/os/freebsd/spl/spl_zone.c
+++ b/module/os/freebsd/spl/spl_zone.c
@@ -27,6 +27,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
diff --git a/module/os/freebsd/zfs/abd_os.c b/module/os/freebsd/zfs/abd_os.c
index b4d43b96a..6b325affa 100644
--- a/module/os/freebsd/zfs/abd_os.c
+++ b/module/os/freebsd/zfs/abd_os.c
@@ -28,6 +28,7 @@
#include <sys/abd_impl.h>
#include <sys/param.h>
+#include <sys/types.h>
#include <sys/zio.h>
#include <sys/zfs_context.h>
#include <sys/zfs_znode.h>
diff --git a/module/os/freebsd/zfs/dmu_os.c b/module/os/freebsd/zfs/dmu_os.c
index 4d367af31..8e412d9c1 100644
--- a/module/os/freebsd/zfs/dmu_os.c
+++ b/module/os/freebsd/zfs/dmu_os.c
@@ -28,6 +28,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
+#include <sys/param.h>
#include <sys/dmu.h>
#include <sys/dmu_impl.h>
#include <sys/dmu_tx.h>
@@ -55,6 +57,7 @@ __FBSDID("$FreeBSD$");
#include <sys/zfs_znode.h>
#include <sys/zfs_vnops.h>
+#include <sys/ccompat.h>
#ifndef IDX_TO_OFF
#define IDX_TO_OFF(idx) (((vm_ooffset_t)(idx)) << PAGE_SHIFT)
diff --git a/module/os/freebsd/zfs/zfs_ctldir.c b/module/os/freebsd/zfs/zfs_ctldir.c
index 2738f5399..8481a9d75 100644
--- a/module/os/freebsd/zfs/zfs_ctldir.c
+++ b/module/os/freebsd/zfs/zfs_ctldir.c
@@ -65,6 +65,9 @@
* so that it cannot be freed until all snapshots have been unmounted.
*/
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/libkern.h>
#include <sys/dirent.h>
#include <sys/zfs_context.h>
#include <sys/zfs_ctldir.h>
@@ -83,6 +86,7 @@
#include "zfs_namecheck.h"
#include <sys/kernel.h>
+#include <sys/ccompat.h>
/* Common access mode for all virtual directories under the ctldir */
const uint16_t zfsctl_ctldir_mode = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP |
diff --git a/module/os/freebsd/zfs/zfs_dir.c b/module/os/freebsd/zfs/zfs_dir.c
index 5aa4cd525..4b1f4a883 100644
--- a/module/os/freebsd/zfs/zfs_dir.c
+++ b/module/os/freebsd/zfs/zfs_dir.c
@@ -60,6 +60,8 @@
#include <sys/dmu_objset.h>
#include <sys/dsl_dir.h>
+#include <sys/ccompat.h>
+
/*
* zfs_match_find() is used by zfs_dirent_lookup() to perform zap lookups
* of names after deciding which is the appropriate lookup interface.