signal.h: Look for _DEFAULT_SOURCE not __USE_GNU for sighandler_t.

Our features.h does not define __USE_GNU, and so applications trying
to use this GNU-ism would have to define it for themselves, even if
_GNU_SOURCE had already been specified.
This commit is contained in:
Augustin Cavalier 2023-08-30 17:31:31 -04:00
parent 8e8c7a073f
commit efdfb84038

View File

@ -61,7 +61,7 @@ typedef struct __siginfo_t {
typedef void (*__sighandler_t)(int);
typedef void (*__siginfo_handler_t)(int, siginfo_t*, void*);
#ifdef __USE_GNU
#if defined(_DEFAULT_SOURCE)
typedef __sighandler_t sighandler_t;
/* GNU-like signal handler typedef */
#endif