mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
socat: Fix compilation when usleep is missing
usleep is a legacy function that was removed in POSIX-2008. uClibc-ng can be configured to compile without it. if out the code as it's not used. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
--- a/sycls.c
|
||||
+++ b/sycls.c
|
||||
@@ -1329,6 +1329,7 @@ unsigned int Sleep(unsigned int seconds) {
|
||||
return retval;
|
||||
}
|
||||
|
||||
+#if 0
|
||||
/* obsolete by POSIX.1-2001 */
|
||||
void Usleep(unsigned long usec) {
|
||||
Debug1("usleep(%lu)", usec);
|
||||
@@ -1336,6 +1337,7 @@ void Usleep(unsigned long usec) {
|
||||
Debug("usleep() ->");
|
||||
return;
|
||||
}
|
||||
+#endif
|
||||
|
||||
#if HAVE_NANOSLEEP
|
||||
unsigned int Nanosleep(const struct timespec *req, struct timespec *rem) {
|
||||
Reference in New Issue
Block a user