| --- 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; |
| } |
| |