PATCH: Include <errno.h> in stdio-common/psiginfo.c
Carlos O'Donell
carlos@systemhalted.org
Fri Apr 24 15:32:00 GMT 2009
On Fri, Apr 24, 2009 at 1:00 AM, H.J. Lu <hongjiu.lu@intel.com> 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/libc.so] 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
Cheers,
Carlos.
More information about the Libc-alpha
mailing list