public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] cygwin: add Object Size Checking to sys/poll.h
@ 2017-11-30 10:07 Yaakov Selkowitz
0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2017-11-30 10:07 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=b3281de25fd8c1d856cc45dfb814593a537bce80
commit b3281de25fd8c1d856cc45dfb814593a537bce80
Author: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Wed Nov 29 11:38:17 2017 -0600
cygwin: add Object Size Checking to sys/poll.h
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diff:
---
winsup/cygwin/include/ssp/poll.h | 26 ++++++++++++++++++++++++++
winsup/cygwin/include/sys/poll.h | 4 ++++
2 files changed, 30 insertions(+)
diff --git a/winsup/cygwin/include/ssp/poll.h b/winsup/cygwin/include/ssp/poll.h
new file mode 100644
index 0000000..831e626
--- /dev/null
+++ b/winsup/cygwin/include/ssp/poll.h
@@ -0,0 +1,26 @@
+#ifndef _SSP_POLL_H_
+#define _SSP_POLL_H_
+
+#include <ssp/ssp.h>
+
+#if __SSP_FORTIFY_LEVEL > 0
+__BEGIN_DECLS
+
+__ssp_decl(int, poll, (struct pollfd *__fds, nfds_t __nfds, int __timeout))
+{
+ __ssp_check (__fds, __nfds * sizeof(*__fds), __ssp_bos);
+ return __ssp_real_poll (__fds, __nfds, __timeout);
+}
+
+#if __GNU_VISIBLE
+__ssp_decl(int, ppoll, (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout_ts, const sigset_t *__sigmask))
+{
+ __ssp_check (__fds, __nfds * sizeof(*__fds), __ssp_bos);
+ return __ssp_real_ppoll (__fds, __nfds, __timeout_ts, __sigmask);
+}
+#endif
+
+__END_DECLS
+
+#endif /* __SSP_FORTIFY_LEVEL > 0 */
+#endif /* _SSP_POLL_H_ */
diff --git a/winsup/cygwin/include/sys/poll.h b/winsup/cygwin/include/sys/poll.h
index 0da4c3f..65822ed 100644
--- a/winsup/cygwin/include/sys/poll.h
+++ b/winsup/cygwin/include/sys/poll.h
@@ -47,4 +47,8 @@ extern int ppoll __P ((struct pollfd *fds, nfds_t nfds,
__END_DECLS
+#if __SSP_FORTIFY_LEVEL > 0
+#include <ssp/poll.h>
+#endif
+
#endif /* _SYS_POLL_H */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-30 10:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 10:07 [newlib-cygwin] cygwin: add Object Size Checking to sys/poll.h Yaakov Selkowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).