This is the mail archive of the 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]

Re: PATCH: Include <errno.h> in stdio-common/psiginfo.c

On Fri, Apr 24, 2009 at 8:30 AM, Carlos O'Donell
<> wrote:
> On Fri, Apr 24, 2009 at 1:00 AM, H.J. Lu <> wrote:
>> ia64 build failed with
>> /export/build/gnu/glibc/build-ia64-linux/libc_pic.os: In function
>> `psiginfo':
>> /net/gnu-6/export/gnu/src/glibc/glibc/stdio-common/psiginfo.c:182:
>> undefined reference to `__set_errno'
>> collect2: ld returned 1 exit status
>> make[3]: *** [/export/build/gnu/glibc/build-ia64-linux/] Error 1
>> make[3]: Leaving directory `/net/gnu-6/export/gnu/src/glibc/glibc'
>> stdio-common/psiginfo.c has
>> write_not_cancel (STDERR_FILENO, buf, strlen (buf));
>> which may use __set_errno. But <errno.h> may not be included. This
>> patch fixes it.
> This is the wrong patch, write_not_cancel expands to INLINE_SYSCALL,
> which is defined in sysdep.h. If you get this build error it means
> your targets sysdep.h file forgot to include errno.h and used
> __set_errno in the INLINE_SYSCALL.
> The correct patch is to add #include <errno.h> to your target sysdep.h

Good idea. Here is the updated patch.

2009-04-24  H.J. Lu  <>

	* sysdeps/unix/sysv/linux/ia64/sysdep.h: Include <errno.h>.

Attachment: libc-errno-2.patch
Description: Text document

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