mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
048937c407
Small Makefile reorganization.
Switch BUILD_PARALLEL to 1. Seems to work now.
Added nanosleep patch that replaces usleep usage.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 473356a562)
21 lines
449 B
Diff
21 lines
449 B
Diff
--- a/lib/libutil/sleep.c
|
|
+++ b/lib/libutil/sleep.c
|
|
@@ -8,7 +8,7 @@
|
|
# include <windows.h>
|
|
# include <process.h>
|
|
#else
|
|
-# include <unistd.h>
|
|
+# include <time.h>
|
|
#endif
|
|
|
|
|
|
@@ -18,6 +18,7 @@ xmlrpc_millisecond_sleep(unsigned int const milliseconds) {
|
|
#if MSVCRT
|
|
SleepEx(milliseconds, true);
|
|
#else
|
|
- usleep(milliseconds * 1000);
|
|
+ const struct timespec req = {0, milliseconds * 1000 * 1000};
|
|
+ nanosleep(&req, NULL);
|
|
#endif
|
|
}
|