diff options
author | emaste <emaste@FreeBSD.org> | 2005-11-23 04:02:27 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2005-11-23 04:02:27 +0000 |
commit | 10886fe6c5be6f90e5ca1b7e92c1fcd3f425d787 (patch) | |
tree | 241ce8a6eef1881b6cbe26780692404ad4c87ef7 /sys | |
parent | 89ac9def6aab31e249a8748547b537afbbd85c5f (diff) | |
download | FreeBSD-src-10886fe6c5be6f90e5ca1b7e92c1fcd3f425d787.zip FreeBSD-src-10886fe6c5be6f90e5ca1b7e92c1fcd3f425d787.tar.gz |
Userland applications may include queue.h and define INVARIANTS
but not provide a panic(9) implementation. Thus, enable the sanity
checks under INVARIANTS only if _KERNEL is also defined.
Submitted by: jmallett
Approved by: rwatson (mentor)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/queue.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/queue.h b/sys/sys/queue.h index 7caccea..efaf30c 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -326,7 +326,7 @@ struct { \ * List functions. */ -#if defined(INVARIANTS) || defined(QUEUE_MACRO_DEBUG) +#if (defined(_KERNEL) && defined(INVARIANTS)) || defined(QUEUE_MACRO_DEBUG) #define QMD_LIST_CHECK_HEAD(head, field) do { \ if (LIST_FIRST((head)) != NULL && \ LIST_FIRST((head))->field.le_prev != \ @@ -349,7 +349,7 @@ struct { \ #define QMD_LIST_CHECK_HEAD(head, field) #define QMD_LIST_CHECK_NEXT(elm, field) #define QMD_LIST_CHECK_PREV(elm, field) -#endif /* defined(INVARIANTS) || defined(QUEUE_MACRO_DEBUG) */ +#endif /* (_KERNEL && INVARIANTS) || QUEUE_MACRO_DEBUG */ #define LIST_EMPTY(head) ((head)->lh_first == NULL) |