This fixes the following warning: ----- CC lib/pthread_sigmask.o lib/pthread_sigmask.c: In function 'rpl_pthread_sigmask': lib/pthread_sigmask.c:52:9: warning: implicit declaration of function 'pthread_sigmask'; did you mean 'rpl_pthread_sigmask'? [-Wimplicit-function-declaration] 52 | ret = pthread_sigmask (how, new_mask, old_mask_ptr); | ^~~~~~~~~~~~~~~ | rpl_pthread_sigmask -----
* lib/signal.in.h [__KLIBC__]: Include <pthread.h>. * lib/sys_select.in.h [__KLIBC__]: Do not include <signal.h>. --- lib/signal.in.h | 6 +++--- lib/sys_select.in.h | 9 ++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/signal.in.h b/lib/signal.in.h index c94b053d6..70a2d4af6 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -55,13 +55,13 @@ #ifndef _@GUARD_PREFIX@_SIGNAL_H #define _@GUARD_PREFIX@_SIGNAL_H -/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android - declare pthread_sigmask in <pthread.h>, not in <signal.h>. +/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android, + OS/2 kLIBC declare pthread_sigmask in <pthread.h>, not in <signal.h>. But avoid namespace pollution on glibc systems.*/ #if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \ && ((defined __APPLE__ && defined __MACH__) \ || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \ - || defined __sun || defined __ANDROID__) \ + || defined __sun || defined __ANDROID__ || defined __KLIBC__) \ && ! defined __GLIBC__ # include <pthread.h> #endif diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index d625d73e7..034b0f32f 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -103,9 +103,16 @@ /* Get definition of 'sigset_t'. But avoid namespace pollution on glibc systems and "unknown type name" problems on Cygwin. + On OS/2 kLIBC, sigset_t is defined in <sys/select.h>, too. In addition, + if <sys/param.h> is included, <types.h> -> <sys/types.h> -> <sys/select.h> + are included. Then <signal.h> -> <pthread.h> are included by GNULIB. By the + way, <pthread.h> requires PAGE_SIZE defined in <sys/param.h>. However, + <sys/param.h> has not been processed, yet. As a result, 'PAGE_SIZE' + undeclared error occurs in <pthread.h>. Do this after the include_next (for the sake of OpenBSD 5.0) but before the split double-inclusion guard (for the sake of Solaris). */ -#if !((defined __GLIBC__ || defined __CYGWIN__) && !defined __UCLIBC__) +#if !((defined __GLIBC__ || defined __CYGWIN__ || defined __KLIBC__) \ + && !defined __UCLIBC__) # include <signal.h> #endif -- 2.22.0