This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Fix x86_64/gettimeofday.c
- From: Andreas Jaeger <aj at suse dot de>
- To: libc-alpha at sources dot redhat dot com
- Date: Tue, 6 Sep 2011 09:42:28 +0200
- Subject: Fix x86_64/gettimeofday.c
With the last round of commits, build fails on x86-64 with:
cc-base/libc.a(gettimeofday.o): In function `__gettimeofday':
../sysdeps/unix/sysv/linux/x86_64/gettimeofday.c:45: undefined reference to `__set_errno'
Here's a fix,
Andreas
2011-09-06 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/x86_64/gettimeofday.c: Include <errno.h>
to fix build.
diff --git a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
index 56171bc..5781b84 100644
--- a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
+++ b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
@@ -36,6 +36,7 @@ gettimeofday_ifunc (void)
}
__asm (".type __gettimeofday, %gnu_indirect_function");
#else
+# include <errno.h>
# include <sys/time.h>
# include <sysdep.h>
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126