summaryrefslogtreecommitdiffstats
path: root/sys/crypto
diff options
context:
space:
mode:
authorrmh <rmh@FreeBSD.org>2013-07-09 10:27:26 +0000
committerrmh <rmh@FreeBSD.org>2013-07-09 10:27:26 +0000
commit7e76036b6dbd1f88f23c94ac6ec5338c7af6b770 (patch)
treed54e13237446f9fe9fc84ca8ea833503b1d10d1b /sys/crypto
parent2d294b765d319b810eb37cc78daa4124c23d9c91 (diff)
downloadFreeBSD-src-7e76036b6dbd1f88f23c94ac6ec5338c7af6b770.zip
FreeBSD-src-7e76036b6dbd1f88f23c94ac6ec5338c7af6b770.tar.gz
Allow assert() to operate correctly when building userland code.
Diffstat (limited to 'sys/crypto')
-rw-r--r--sys/crypto/sha2/sha2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/crypto/sha2/sha2.c b/sys/crypto/sha2/sha2.c
index 3bbf3cc..1313db5 100644
--- a/sys/crypto/sha2/sha2.c
+++ b/sys/crypto/sha2/sha2.c
@@ -67,8 +67,10 @@ __FBSDID("$FreeBSD$");
*
*/
-#if defined(__bsdi__) || defined(__FreeBSD__)
+#if defined(_KERNEL) && (defined(__bsdi__) || defined(__FreeBSD__))
#define assert(x)
+#else
+#include <assert.h>
#endif
OpenPOWER on IntegriCloud