This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
[PATCH] Cygwin: fix signal.h with _POSIX_C_SOURCE=1
- From: Yaakov Selkowitz <yselkowi at redhat dot com>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 4 Jul 2017 18:21:16 -0500
- Subject: [PATCH] Cygwin: fix signal.h with _POSIX_C_SOURCE=1
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=yselkowi at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1F1CE811AC
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1F1CE811AC
struct sigaction is POSIX.1-1990 but siginfo_t, which is used by its
sa_sigaction member, is POSIX.1b-1993. Therefore it needs to be guarded
as well, and as part of a union, the struct size is protected.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
---
winsup/cygwin/include/cygwin/signal.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/winsup/cygwin/include/cygwin/signal.h b/winsup/cygwin/include/cygwin/signal.h
index 700d45c13..e73874c62 100644
--- a/winsup/cygwin/include/cygwin/signal.h
+++ b/winsup/cygwin/include/cygwin/signal.h
@@ -325,7 +325,9 @@ struct sigaction
__extension__ union
{
_sig_func_ptr sa_handler; /* SIG_DFL, SIG_IGN, or pointer to a function */
+#if __POSIX_VISIBLE >= 199309
void (*sa_sigaction) ( int, siginfo_t *, void * );
+#endif
};
sigset_t sa_mask;
int sa_flags;
--
2.12.3