This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]