diff options
author | mav <mav@FreeBSD.org> | 2014-01-05 19:07:42 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-01-05 19:07:42 +0000 |
commit | 0b0d3d9762acca684f769165e77c904e835c42bf (patch) | |
tree | 6def62d3fc0c6471fba99f40a8e15f997a5c56ad /sys/cddl | |
parent | f06ffda24307372cdf9724883f8b78e76ba141cc (diff) | |
download | FreeBSD-src-0b0d3d9762acca684f769165e77c904e835c42bf.zip FreeBSD-src-0b0d3d9762acca684f769165e77c904e835c42bf.tar.gz |
Fix build after r260234 by converting ddi_get_lbolt64() from inline into
a macro. Otherwise compiler complains that hz variable used there either
undefined or defined twice, thanks to header mess caused by compat shims.
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/compat/opensolaris/sys/time.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/sys/cddl/compat/opensolaris/sys/time.h b/sys/cddl/compat/opensolaris/sys/time.h index e980e3b..fe4857a 100644 --- a/sys/cddl/compat/opensolaris/sys/time.h +++ b/sys/cddl/compat/opensolaris/sys/time.h @@ -70,21 +70,10 @@ gethrtime(void) { #define gethrtime_waitfree() gethrtime() extern int nsec_per_tick; /* nanoseconds per clock tick */ -extern int hz; /* clock ticks per second */ -static __inline int64_t -ddi_get_lbolt64(void) -{ - - return (((getsbinuptime() >> 16) * hz) >> 16); -} - -static __inline clock_t -ddi_get_lbolt(void) -{ - - return (ddi_get_lbolt64()); -} +#define ddi_get_lbolt64() \ + (int64_t)(((getsbinuptime() >> 16) * hz) >> 16) +#define ddi_get_lbolt() (clock_t)ddi_get_lbolt64() #else |