aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2020-07-25 20:07:44 -0700
committerGitHub <[email protected]>2020-07-25 20:07:44 -0700
commit6d8da84106de1fc8480e1758cc88e81393b4c0c2 (patch)
tree04d232d8f21a8c96978b7d1c329f7d1cc355248c /include
parentf5b189f9379b092600293ac3e7a670bf2087d88c (diff)
Make use of ZFS_DEBUG consistent within kmod sources
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #10623
Diffstat (limited to 'include')
-rw-r--r--include/os/freebsd/spl/sys/ccompile.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/os/freebsd/spl/sys/ccompile.h b/include/os/freebsd/spl/sys/ccompile.h
index 4dda0756f..116612b61 100644
--- a/include/os/freebsd/spl/sys/ccompile.h
+++ b/include/os/freebsd/spl/sys/ccompile.h
@@ -119,9 +119,11 @@ extern "C" {
#define __CONST __sun_attr__((__const__))
#define __PURE __sun_attr__((__pure__))
-#if (defined(ZFS_DEBUG) || !defined(NDEBUG))&& !defined(DEBUG)
-#define DEBUG
+#ifdef INVARIANTS
+#define ZFS_DEBUG
+#undef NDEBUG
#endif
+
#define EXPORT_SYMBOL(x)
#define MODULE_AUTHOR(s)
#define MODULE_DESCRIPTION(s)
@@ -134,6 +136,9 @@ extern "C" {
#ifdef ZFS_DEBUG
#undef NDEBUG
#endif
+#if !defined(ZFS_DEBUG) && !defined(NDEBUG)
+#define NDEBUG
+#endif
#ifndef EINTEGRITY
#define EINTEGRITY 97 /* EINTEGRITY is new in 13 */