public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Cygwin: signal.cc: Include <unistd.h>
@ 2022-05-12  6:43 Sebastian Huber
  2022-05-12  8:14 ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Huber @ 2022-05-12  6:43 UTC (permalink / raw)
  To: newlib

Include <unistd.h> for sleep() and usleep() declarations.  Fix return type of
usleep().
---
 winsup/cygwin/signal.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index 9b6c2509d..22d3715df 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -11,6 +11,7 @@ details. */
 
 #include "winsup.h"
 #include <stdlib.h>
+#include <unistd.h>
 #include <sys/cygwin.h>
 #include <sys/signalfd.h>
 #include "pinfo.h"
@@ -163,7 +164,7 @@ nanosleep (const struct timespec *rqtp, struct timespec *rmtp)
   return 0;
 }
 
-extern "C" unsigned int
+unsigned int
 sleep (unsigned int seconds)
 {
   struct timespec req, rem;
@@ -174,7 +175,7 @@ sleep (unsigned int seconds)
   return 0;
 }
 
-extern "C" unsigned int
+int
 usleep (useconds_t useconds)
 {
   struct timespec req;
-- 
2.35.3


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-12 16:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12  6:43 [PATCH] Cygwin: signal.cc: Include <unistd.h> Sebastian Huber
2022-05-12  8:14 ` Corinna Vinschen
2022-05-12  8:22   ` Sebastian Huber
2022-05-12  8:46     ` Corinna Vinschen
2022-05-12 14:48       ` Brian Inglis
2022-05-12 16:05         ` Corinna Vinschen

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).