From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: newlib@sourceware.org
Subject: [PATCH] Cygwin: signal.cc: Include <unistd.h>
Date: Thu, 12 May 2022 08:43:32 +0200 [thread overview]
Message-ID: <20220512064332.23298-1-sebastian.huber@embedded-brains.de> (raw)
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
next reply other threads:[~2022-05-12 6:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 6:43 Sebastian Huber [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220512064332.23298-1-sebastian.huber@embedded-brains.de \
--to=sebastian.huber@embedded-brains.de \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).