aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2022-05-27 15:56:05 -0700
committerBrian Behlendorf <[email protected]>2022-05-31 12:04:39 -0700
commit91350681b8c8b3f0a9b04e6ab3b8931406e87355 (patch)
tree9e799e75e53835b7d126dcae31274caeb81b7f23 /include
parentd41e864181e4544eca08332b31f85318a3b0e3b3 (diff)
Linux 5.19 compat: zap_flags_t conflict
As of the Linux 5.19 kernel an identically named zap_flags_t typedef is declared in the include/linux/mm_types.h linux header. Sadly, the inclusion of this header cannot be easily avoided. To resolve the conflict a #define is used to remap the name in the OpenZFS sources when building against the Linux kernel. Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #13515
Diffstat (limited to 'include')
-rw-r--r--include/sys/zap.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sys/zap.h b/include/sys/zap.h
index b19b46438..fd7a3a159 100644
--- a/include/sys/zap.h
+++ b/include/sys/zap.h
@@ -110,7 +110,12 @@ typedef enum zap_flags {
* already randomly distributed.
*/
ZAP_FLAG_PRE_HASHED_KEY = 1 << 2,
+#if defined(__linux__) && defined(_KERNEL)
+} zfs_zap_flags_t;
+#define zap_flags_t zfs_zap_flags_t
+#else
} zap_flags_t;
+#endif
/*
* Create a new zapobj with no attributes and return its object number.