aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/tslog.h
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2017-12-31 21:00:21 +0000
committerColin Percival <cperciva@FreeBSD.org>2017-12-31 21:00:21 +0000
commit0337438d5d9158ce6d08948a1a21ac1499debd98 (patch)
tree0607e4edc8231d2ecfd62788826b79974c1f2631 /sys/sys/tslog.h
parenta9bcc66178ed356fea2e4d693a6cd77222251703 (diff)
downloadsrc-0337438d5d9158ce6d08948a1a21ac1499debd98.tar.gz
src-0337438d5d9158ce6d08948a1a21ac1499debd98.zip
Wrap includes in sys/tslog.h with #ifdef TSLOG.
This is necessary because some non-kernel code #defines _KERNEL and then includes kernel headers; as a result, it was getting conflicting versions of curthread and curproc. Non-kernel code should probably refrain from defining _KERNEL, but for now hiding these indirect inclusions fixes the build. Reported by: Michael Butler, Herbert J. Skuhra
Notes
Notes: svn path=/head/; revision=327447
Diffstat (limited to 'sys/sys/tslog.h')
-rw-r--r--sys/sys/tslog.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/tslog.h b/sys/sys/tslog.h
index 252e32e9db4f..4b2971e4e643 100644
--- a/sys/sys/tslog.h
+++ b/sys/sys/tslog.h
@@ -29,8 +29,10 @@
#ifndef _TSLOG_H_
#define _TSLOG_H_
+#ifdef TSLOG
#include <sys/_types.h>
#include <sys/pcpu.h>
+#endif
#define TS_ENTER 0
#define TS_EXIT 1