Solaris: Don't access lbolt directly
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Tue, 22 Dec 2009 21:46:43 +0000 (21:46 +0000)
committerDerrick Brashear <shadow|account-1000005@unknown>
Tue, 22 Dec 2009 23:26:40 +0000 (15:26 -0800)
Recent changes in OpenSolaris have removed the 'lbolt' variable.
However, the ddi_get_lbolt accessor (which has been present since
Solaris 10) can be used to get access to the same value. So, use it.

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

src/afs/SOLARIS/osi_sleep.c

index a219d78..bf62279 100644 (file)
@@ -176,7 +176,11 @@ osi_TimedSleep(char *event, afs_int32 ams, int aintok)
     clock_t ticks;
 
     ticks = (ams * afs_hz) / 1000;
+#if defined(AFS_SUN510_ENV)
+    ticks = ticks + ddi_get_lbolt();
+#else
     ticks = ticks + lbolt;
+#endif
 
     evp = afs_getevent(event);