From: Josef Schlehofer Date: Fri, 13 Jun 2025 13:06:17 +0000 (+0200) Subject: treewide: drop nanosleep patches related to uClibc-ng X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=ed1f824059649fd7ce0f67ae2ee04d77e6299959;p=feed%2Fpackages.git treewide: drop nanosleep patches related to uClibc-ng 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 --- diff --git a/devel/lpc21isp/Makefile b/devel/lpc21isp/Makefile index cdf6cb72fd..51400effe0 100644 --- a/devel/lpc21isp/Makefile +++ b/devel/lpc21isp/Makefile @@ -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 index 9e3ef9738a..0000000000 --- a/devel/lpc21isp/patches/120-nanosleep.patch +++ /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 - diff --git a/libs/nss/Makefile b/libs/nss/Makefile index c96741fb8e..06cf9cafe8 100644 --- a/libs/nss/Makefile +++ b/libs/nss/Makefile @@ -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 index 414ebf3a39..0000000000 --- a/libs/nss/patches/010-nanosleep.patch +++ /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; - } - diff --git a/libs/xmlrpc-c/Makefile b/libs/xmlrpc-c/Makefile index 61fe717e46..cd3c4204cb 100644 --- a/libs/xmlrpc-c/Makefile +++ b/libs/xmlrpc-c/Makefile @@ -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 index 52703cb206..0000000000 --- a/libs/xmlrpc-c/patches/010-nanosleep.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/lib/libutil/sleep.c -+++ b/lib/libutil/sleep.c -@@ -8,7 +8,7 @@ - # include - # include - #else --# include -+# include - #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 - } diff --git a/net/libreswan/Makefile b/net/libreswan/Makefile index eb407e432c..c94c7a7aea 100644 --- a/net/libreswan/Makefile +++ b/net/libreswan/Makefile @@ -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 index b65cb91a80..0000000000 --- a/net/libreswan/patches/010-nanosleep.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/programs/pluto/send.c -+++ b/programs/pluto/send.c -@@ -26,7 +26,7 @@ - * - */ - --#include /* for usleep() */ -+#include /* for nanosleep() */ - #include - - #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,