summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/gettimeofday.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-01-30 12:48:16 +0000
committerkib <kib@FreeBSD.org>2013-01-30 12:48:16 +0000
commit3913be8cf6bae0deea4548df2c3655b08fc13966 (patch)
tree8420271c2048f0f68fc109f9ebcfac2a36b6f164 /lib/libc/sys/gettimeofday.c
parentb19d7b3a7d074dab1d31875d6620e3fe26a41666 (diff)
downloadFreeBSD-src-3913be8cf6bae0deea4548df2c3655b08fc13966.zip
FreeBSD-src-3913be8cf6bae0deea4548df2c3655b08fc13966.tar.gz
Rework the __vdso_* symbols attributes to only make the symbols weak,
but use normal references instead of weak. This makes the statically linked binaries to use fast gettimeofday(2) by forcing the linker to resolve references and providing the neccessary functions. Reported by: bde Tested by: marius (sparc64) MFC after: 2 weeks
Diffstat (limited to 'lib/libc/sys/gettimeofday.c')
-rw-r--r--lib/libc/sys/gettimeofday.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libc/sys/gettimeofday.c b/lib/libc/sys/gettimeofday.c
index 4cc87e1..5b12523 100644
--- a/lib/libc/sys/gettimeofday.c
+++ b/lib/libc/sys/gettimeofday.c
@@ -41,10 +41,7 @@ __gettimeofday(struct timeval *tv, struct timezone *tz)
{
int error;
- if (__vdso_gettimeofday != NULL && __vdso_gettc != NULL)
- error = __vdso_gettimeofday(tv, tz);
- else
- error = ENOSYS;
+ error = __vdso_gettimeofday(tv, tz);
if (error == ENOSYS)
error = __sys_gettimeofday(tv, tz);
return (error);
OpenPOWER on IntegriCloud