Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Apr 2006 23:24:43 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 95638 for review
Message-ID:  <200604192324.k3JNOhN1020905@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95638

Change 95638 by jb@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604192324.k3JNOhN1020905>