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]>
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
+++ /dev/null
---- 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
-
PKG_NAME:=nss
PKG_VERSION:=3.93
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= \
+++ /dev/null
---- 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;
- }
-
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)
+++ /dev/null
---- 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
- }
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/
+++ /dev/null
---- 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,