This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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]

[PATCH] Include errno.h in sysdep.h for INLINE_SYSCALL using __set_errno


Hi 

While building glibc for arm I get this error.

/arm-none-linux-gnueabi/obj/eglibc/libc_pic.os: In function `psiginfo':
libc/stdio-common/psiginfo.c:182: undefined reference to `__set_errno'
collect2: ld returned 1 exit status

This happens because write_not_cancel () macro expansion from sysdeps/unix/sysv/linux/not-cancel.h
used INLINE_SYSCALL macro which uses __set_errno but <errno.h> does not get included in while compiling
libc/stdio-common/psiginfo.c

This does not happen on x86 because x86 has its own version of not-cancel.h (nptl/sysdeps/unix/sysv/linux/i386/not-cancel.h)

This patch fixes it on arm.

-- 
Khem Raj

ChangeLog.arm

2009-03-16  Khem Raj  <raj.khem@gmail.com>

	* sysdeps/unix/sysv/linux/arm/sysdep.h: Include errno.h.



Index: ports/sysdeps/unix/sysv/linux/arm/sysdep.h
===================================================================
--- ports/sysdeps/unix/sysv/linux/arm/sysdep.h	(revision 8114)
+++ ports/sysdeps/unix/sysv/linux/arm/sysdep.h	(working copy)
@@ -30,6 +30,11 @@
 
 #include <tls.h>
 
+/* In order to get __set_errno() definition in INLINE_SYSCALL.  */
+#ifndef __ASSEMBLER__
+#include <errno.h>
+#endif
+
 /* For Linux we can use the system call table in the header file
 	/usr/include/asm/unistd.h
    of the kernel.  But these symbols do not follow the SYS_* syntax

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