public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] ia64: include errno.h in sysdep.h
@ 2012-05-08  3:26 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2012-05-08  3:26 UTC (permalink / raw)
  To: libc-ports

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                        |    4 ++++
 sysdeps/unix/sysv/linux/ia64/sysdep.h |    5 +++++
 2 files changed, 9 insertions(+)

diff --git a/ChangeLog.ia64 b/ChangeLog.ia64
index 307fac3..11ba030 100644
--- a/ChangeLog.ia64
+++ b/ChangeLog.ia64
@@ -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.
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
index ebaec95..5d02429 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
@@ -25,6 +25,11 @@
 #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).
-- 
1.7.9.7

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-08  3:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-08  3:26 [PATCH] ia64: include errno.h in sysdep.h Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).