mirror of
https://github.com/fluencelabs/musl
synced 2025-04-25 07:12:15 +00:00
fix broken siginfo_t with _GNU_SOURCE defined
this bug was introduced in a recent patch. the problem we're working around is that broken GNU software wants to use "struct siginfo" rather than "siginfo_t", but "siginfo" is not in the reserved namespace and thus not legal for the standard header to use.
This commit is contained in:
parent
114c80f141
commit
03a8362930
@ -8,6 +8,10 @@ extern "C" {
|
|||||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
|
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
|
||||||
|
|
||||||
|
#ifdef _GNU_SOURCE
|
||||||
|
#define __siginfo siginfo
|
||||||
|
#endif
|
||||||
|
|
||||||
#define __NEED_size_t
|
#define __NEED_size_t
|
||||||
#define __NEED_pid_t
|
#define __NEED_pid_t
|
||||||
#define __NEED_uid_t
|
#define __NEED_uid_t
|
||||||
@ -95,12 +99,7 @@ union sigval {
|
|||||||
void *sival_ptr;
|
void *sival_ptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef _GNU_SOURCE
|
struct __siginfo {
|
||||||
struct siginfo
|
|
||||||
#else
|
|
||||||
struct __siginfo
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
int si_signo, si_errno, si_code;
|
int si_signo, si_errno, si_code;
|
||||||
union {
|
union {
|
||||||
char __pad[128 - 3*sizeof(int)];
|
char __pad[128 - 3*sizeof(int)];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user