Include <signal.h> in <nptl-signals.h>

Message ID mvmtwzdpu60.fsf@hawking.suse.de
State Superseded
Headers

Commit Message

Andreas Schwab Jan. 26, 2015, 1:07 p.m. UTC
  Architectures which don't use hp-timing-common.h don't include
<signal.h> via <sys/param.h>, causing this error:

In file included from ../nptl/pthreadP.h:35:0,
                 from ../sysdeps/nptl/allocrtsig.c:19:
../sysdeps/unix/sysv/linux/nptl-signals.h:20:25: warning: "__SIGRTMIN" is not defined [-Wundef]
 #define SIGCANCEL       __SIGRTMIN
                         ^
../sysdeps/unix/sysv/linux/nptl-signals.h:26:25: note: in expansion of macro 'SIGCANCEL'
 #define SIGTIMER        SIGCANCEL
                         ^
../sysdeps/nptl/allocrtsig.c:30:48: note: in expansion of macro 'SIGTIMER'
 #if defined SIGTIMER && (!defined SIGCANCEL || SIGTIMER != SIGCANCEL)
                                                ^

Andreas.

	* sysdeps/unix/sysv/linux/nptl-signals.h: Include <signal.h>.
  

Comments

Roland McGrath Jan. 27, 2015, 7:15 p.m. UTC | #1
OK
  

Patch

diff --git a/sysdeps/unix/sysv/linux/nptl-signals.h b/sysdeps/unix/sysv/linux/nptl-signals.h
index f45f170..b7b74ad 100644
--- a/sysdeps/unix/sysv/linux/nptl-signals.h
+++ b/sysdeps/unix/sysv/linux/nptl-signals.h
@@ -16,6 +16,8 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <signal.h>
+
 /* The signal used for asynchronous cancelation.  */
 #define SIGCANCEL       __SIGRTMIN