PERFORCE change 95638 for review
John Birrell
jb at FreeBSD.org
Wed Apr 19 23:24:44 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=95638
Change 95638 by jb at jb_freebsd2 on 2006/04/19 23:24:14
Protect definitions when included in kernel code.
Also start moving the compatibility include paths to refer to the
contrib directory. The reason for this is that FreeBSD's
kernel monolithic build only has a usable include path to the sys
directory. I need to support building the dtrace device and any
of the providers into the kernel.
At the moment the devices build fine as kernel modules because
I can add to CFLAGS when building the modules. I don't want to
make the kernel build any more complicated than it already is.
Affected files ...
.. //depot/projects/dtrace/src/sys/contrib/opensolaris/compat/sys/time.h#2 edit
Differences ...
==== //depot/projects/dtrace/src/sys/contrib/opensolaris/compat/sys/time.h#2 (text+ko) ====
@@ -4,7 +4,7 @@
#define _OPENSOLARIS_COMPAT_SYS_TIME_H_
#include <sys/time.h>
-#include <opensolaris/compat/sys/types.h>
+#include <contrib/opensolaris/compat/sys/types.h>
/*
* Definitions for commonly used resolutions.
@@ -16,10 +16,12 @@
typedef longlong_t hrtime_t;
+#ifndef _KERNEL
static __inline hrtime_t gethrtime() {
struct timespec ts;
clock_gettime(CLOCK_UPTIME,&ts);
return (ts.tv_sec * NANOSEC + ts.tv_nsec);
}
+#endif
#endif
More information about the p4-projects
mailing list