summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-09-20 10:58:18 -0400
committerRich Felker <dalias@aerifal.cx>2011-09-20 10:58:18 -0400
commit03a8362930c3c4fe49ee6b9cb2ba9f28153b15d3 (patch)
tree3c86951f2b20a017fc915630318dcaa79d3d8005
parent114c80f1416617399c85c2df09dd307532399903 (diff)
downloadmusl-03a8362930c3c4fe49ee6b9cb2ba9f28153b15d3.tar.gz
musl-03a8362930c3c4fe49ee6b9cb2ba9f28153b15d3.tar.bz2
musl-03a8362930c3c4fe49ee6b9cb2ba9f28153b15d3.tar.xz
musl-03a8362930c3c4fe49ee6b9cb2ba9f28153b15d3.zip
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.
-rw-r--r--include/signal.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/signal.h b/include/signal.h
index cbbb42a7..0fdf720c 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -8,6 +8,10 @@ extern "C" {
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#ifdef _GNU_SOURCE
+#define __siginfo siginfo
+#endif
+
#define __NEED_size_t
#define __NEED_pid_t
#define __NEED_uid_t
@@ -95,12 +99,7 @@ union sigval {
void *sival_ptr;
};
-#ifdef _GNU_SOURCE
-struct siginfo
-#else
-struct __siginfo
-#endif
-{
+struct __siginfo {
int si_signo, si_errno, si_code;
union {
char __pad[128 - 3*sizeof(int)];