[Pkg-wmaker-commits] [wmload] 23/58: wmload: Replace deprecated usleep with nanosleep.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:36:21 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmload.
commit 0f85b2a9bc2879a959c4d94993b776c52f9c4c44
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Tue Apr 7 02:45:23 2015 -0500
wmload: Replace deprecated usleep with nanosleep.
---
wmload.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/wmload.c b/wmload.c
index d593205..025460d 100644
--- a/wmload.c
+++ b/wmload.c
@@ -1,3 +1,5 @@
+#define _POSIX_C_SOURCE 199309L
+
#include <stdio.h>
#include <string.h>
#include <unistd.h>
@@ -342,7 +344,13 @@ int main(int argc,char *argv[])
#ifdef SYSV
poll((struct poll *) 0, (size_t) 0, 50);
#else
- usleep(50000L); /* 5/100 sec */
+ {
+ struct timespec ts;
+
+ ts.tv_sec = 0;
+ ts.tv_nsec = 50000000L; /* 5/100 sec */
+ nanosleep(&ts, NULL);
+ }
#endif
}
return 0;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmload.git
More information about the Pkg-wmaker-commits
mailing list