Fix UKERNEL build error - include afs/afs_osi.h
authorMarc Dionne <marc.c.dionne@gmail.com>
Sat, 10 Apr 2010 00:19:19 +0000 (20:19 -0400)
committerDerrick Brashear <shadow@dementia.org>
Sat, 10 Apr 2010 03:55:40 +0000 (20:55 -0700)
Commit d0f2ffca breaks the build on my system because
afs/afs_osi.h no longer gets included for the UKERNEL + !KERNEL
case.  This causes many errors as a result of missing definitions
such as afs_kmutex_t.
Pull out this include into a separate ifdef based only on "KERNEL".

Change-Id: Idafa7702550eb8cb2c7693f4173e482b15702d7e
Reviewed-on: http://gerrit.openafs.org/1733
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/rx/rx_clock.h

index 38bb130..bef0f92 100644 (file)
@@ -42,6 +42,9 @@ struct clock {
     afs_int32 usec;            /* Microseconds since clock_Init */
 };
 
+#if defined(KERNEL)
+#include "afs/afs_osi.h"
+#endif
 #if !defined(KERNEL) || defined(UKERNEL)
 #if defined(AFS_USE_GETTIMEOFDAY) || defined(AFS_PTHREAD_ENV) || defined(UKERNEL)
 #define clock_Init()
@@ -85,7 +88,6 @@ extern int clock_nUpdates;
 #define        clock_Sec() ((!clock_haveCurrentTime)? clock_UpdateTime(), clock_now.sec:clock_now.sec)
 #endif /* AFS_USE_GETTIMEOFDAY || AFS_PTHREAD_ENV */
 #else /* KERNEL */
-#include "afs/afs_osi.h"
 #define clock_Init()
 #if defined(AFS_SGI61_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX_64BIT_KERNEL)
 #define clock_GetTime(cv) osi_GetTime((osi_timeval_t *)cv)