treewide: drop nanosleep patches related to uClibc-ng
authorJosef Schlehofer <[email protected]>
Fri, 13 Jun 2025 13:06:17 +0000 (15:06 +0200)
committerJosef Schlehofer <[email protected]>
Mon, 16 Jun 2025 10:17:17 +0000 (12:17 +0200)
These all patches were related to uClibc-ng
according to this commit [1]. uClibc-ng was
removed in OpenWrt main repo, so these patches
are not needed anymore. They could not be even
applied by `git am`, so there is difficult to find
who authored it, if it was upstreamed (most likely not).

[1] c1a9e69feff5c879ddcdf476f59285b137c05ecd ("libreswan: Replace usleep with nanosleep")
[2] https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=63fb175203bbf3b336804587c2f5b3a2d8132ec1

Signed-off-by: Josef Schlehofer <[email protected]>
devel/lpc21isp/Makefile
devel/lpc21isp/patches/120-nanosleep.patch [deleted file]
libs/nss/Makefile
libs/nss/patches/010-nanosleep.patch [deleted file]
libs/xmlrpc-c/Makefile
libs/xmlrpc-c/patches/010-nanosleep.patch [deleted file]
net/libreswan/Makefile
net/libreswan/patches/010-nanosleep.patch [deleted file]

index cdf6cb72fdd2f30ed7863cdf0da6bef02b45113c..51400effe089aa0e070ac9af9f73a13bef9617bf 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lpc21isp
 PKG_VERSION:=197
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 PKG_LICENSE:=LGPL-3.0-or-later
 PKG_LICENSE_FILES:=README gpl.txt lgpl-3.0.txt
 
diff --git a/devel/lpc21isp/patches/120-nanosleep.patch b/devel/lpc21isp/patches/120-nanosleep.patch
deleted file mode 100644 (file)
index 9e3ef97..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/lpc21isp.c
-+++ b/lpc21isp.c
-@@ -1130,7 +1130,8 @@ void ClearSerialPortBuffers(ISP_ENVIRONM
- */
- void Sleep(unsigned long MilliSeconds)
- {
--    usleep(MilliSeconds*1000); //convert to microseconds
-+    struct timespec m = { MilliSeconds / 1000 , (MilliSeconds % 1000 ) * 1000 * 1000};
-+    nanosleep(&m, &m); //convert to nanoseconds
- }
- #endif // defined COMPILE_FOR_LINUX
index c96741fb8ef0b6102a0cc4071882184f373e47bd..06cf9cafe8886590d1d6da05472bfb1d7702a3dc 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nss
 PKG_VERSION:=3.93
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= \
diff --git a/libs/nss/patches/010-nanosleep.patch b/libs/nss/patches/010-nanosleep.patch
deleted file mode 100644 (file)
index 414ebf3..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/nss/lib/freebl/stubs.c
-+++ b/nss/lib/freebl/stubs.c
-@@ -506,7 +506,8 @@ extern PRStatus
- PR_Sleep_stub(PRIntervalTime ticks)
- {
-     STUB_SAFE_CALL1(PR_Sleep, ticks);
--    usleep(ticks * 1000);
-+    const struct timespec req = {0, ticks * 1000 * 1000};
-+    nanosleep(&req, NULL);
-     return PR_SUCCESS;
- }
---- a/nss/lib/sqlite/sqlite3.c
-+++ b/nss/lib/sqlite/sqlite3.c
-@@ -39626,7 +39626,8 @@ static int proxyConchLock(unixFile *pFil
-       
-       if( nTries==1 ){
-         conchModTime = buf.st_mtimespec;
--        usleep(500000); /* wait 0.5 sec and try the lock again*/
-+        const struct timespec req = {0, 500 * 1000 * 1000};
-+        nanosleep(&req, NULL); /* wait 0.5 sec and try the lock again*/
-         continue;  
-       }
-@@ -39652,7 +39653,7 @@ static int proxyConchLock(unixFile *pFil
-           /* don't break the lock on short read or a version mismatch */
-           return SQLITE_BUSY;
-         }
--        usleep(10000000); /* wait 10 sec and try the lock again */
-+        sleep(10); /* wait 10 sec and try the lock again */
-         continue; 
-       }
-       
index 61fe717e467ea0dd9d9f09d4db285c7e37c6084a..cd3c4204cb68d294387d9cd4c7ffc1f736918f26 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xmlrpc-c
 PKG_VERSION:=1.59.03
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=@SF/xmlrpc-c/Xmlrpc-c%20Super%20Stable/$(PKG_VERSION)
diff --git a/libs/xmlrpc-c/patches/010-nanosleep.patch b/libs/xmlrpc-c/patches/010-nanosleep.patch
deleted file mode 100644 (file)
index 52703cb..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- 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 co
- #if MSVCRT
-     SleepEx(milliseconds, true);
- #else
--    usleep(milliseconds * 1000);
-+    const struct timespec req = {0, milliseconds * 1000 * 1000};
-+    nanosleep(&req, NULL);
- #endif
- }
index eb407e432c6518549dd786b14e92b6e5073c3d20..c94c7a7aea875e65297de36a62db6498f50a0c49 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libreswan
 PKG_VERSION:=4.12
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://download.libreswan.org/
diff --git a/net/libreswan/patches/010-nanosleep.patch b/net/libreswan/patches/010-nanosleep.patch
deleted file mode 100644 (file)
index b65cb91..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/programs/pluto/send.c
-+++ b/programs/pluto/send.c
-@@ -26,7 +26,7 @@
-  *
-  */
--#include <unistd.h>   /* for usleep() */
-+#include <time.h>     /* for nanosleep() */
- #include <errno.h>
- #include "defs.h"
-@@ -192,7 +192,8 @@ static bool send_shunks(const char *wher
-        */
-       if (impair.jacob_two_two) {
-               /* sleep for half a second, and second another packet */
--              usleep(500000);
-+              const struct timespec req = {0, 500 * 1000 * 1000};
-+              nanosleep(&req, NULL);
-               endpoint_buf b;
-               endpoint_buf ib;
-               llog(RC_LOG, logger,