From owner-p4-projects@FreeBSD.ORG Wed Apr 19 23:24:44 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E2DBE16A406; Wed, 19 Apr 2006 23:24:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A944516A401 for ; Wed, 19 Apr 2006 23:24:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76B4043D49 for ; Wed, 19 Apr 2006 23:24:43 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JNOh4B020908 for ; Wed, 19 Apr 2006 23:24:43 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3JNOhN1020905 for perforce@freebsd.org; Wed, 19 Apr 2006 23:24:43 GMT (envelope-from jb@freebsd.org) Date: Wed, 19 Apr 2006 23:24:43 GMT Message-Id: <200604192324.k3JNOhN1020905@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95638 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 23:24:44 -0000 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 -#include +#include /* * 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