ia64: include errno.h in sysdep.h
authorMike Frysinger <vapier@gentoo.org>
Tue, 8 May 2012 03:17:48 +0000 (23:17 -0400)
committerMike Frysinger <vapier@gentoo.org>
Tue, 8 May 2012 03:22:59 +0000 (23:22 -0400)
This header uses __set_errno(), so make sure we include errno.h for it.
Otherwise, if INLINE_SYSCALL() is used and errno.h isn't included, we
hit warnings like so:
In file included from libc-start.c:36:0:
../sysdeps/unix/sysv/linux/dl-osinfo.h: In function '_dl_setup_stack_chk_guard':
../sysdeps/unix/sysv/linux/dl-osinfo.h:79:7: warning: implicit declaration of function '__set_errno'

Which culminate in errors like so:
libc-start.c:(.text+0x692): undefined reference to '__set_errno'
libc-start.c:(.text+0x752): undefined reference to '__set_errno'
collect2: ld returned 1 exit status

Reported-by: Dennis Schridde <devurandom@gmx.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
ChangeLog.ia64
sysdeps/unix/sysv/linux/ia64/sysdep.h

index 307fac353d7e98a946b83c79a7546423f2406f8d..11ba030450d836569b3d5062b4edd283fbe41d68 100644 (file)
@@ -1,3 +1,7 @@
+2012-05-07  Mike Frysinger  <vapier@gentoo.org>
+
+       * sysdeps/unix/sysv/linux/ia64/sysdep.h: Include errno.h.
+
 2012-05-06  Mike Frysinger  <vapier@gentoo.org>
 
        * data/localplt-ia64-linux-gnu.data: New file.
index ebaec952799875f5c02371d1253d13e4fa8777c5..5d02429e0583633b6fc427ca7c9ecc3cea81462d 100644 (file)
 #include <dl-sysdep.h>
 #include <tls.h>
 
+/* In order to get __set_errno() definition in INLINE_SYSCALL.  */
+#ifndef __ASSEMBLER__
+#include <errno.h>
+#endif
+
 /* As of GAS v2.4.90.0.7, including a ".align" directive inside a
    function will cause bad unwind info to be emitted (GAS doesn't know
    how to account for the padding introduced by the .align directive).