nss: update to 3.88.1
[feed/packages.git] / libs / nss / patches / 010-nanosleep.patch
1 --- a/nss/lib/freebl/stubs.c
2 +++ b/nss/lib/freebl/stubs.c
3 @@ -501,7 +501,8 @@ extern PRStatus
4 PR_Sleep_stub(PRIntervalTime ticks)
5 {
6 STUB_SAFE_CALL1(PR_Sleep, ticks);
7 - usleep(ticks * 1000);
8 + const struct timespec req = {0, ticks * 1000 * 1000};
9 + nanosleep(&req, NULL);
10 return PR_SUCCESS;
11 }
12
13 --- a/nss/lib/sqlite/sqlite3.c
14 +++ b/nss/lib/sqlite/sqlite3.c
15 @@ -39626,7 +39626,8 @@ static int proxyConchLock(unixFile *pFil
16
17 if( nTries==1 ){
18 conchModTime = buf.st_mtimespec;
19 - usleep(500000); /* wait 0.5 sec and try the lock again*/
20 + const struct timespec req = {0, 500 * 1000 * 1000};
21 + nanosleep(&req, NULL); /* wait 0.5 sec and try the lock again*/
22 continue;
23 }
24
25 @@ -39652,7 +39653,7 @@ static int proxyConchLock(unixFile *pFil
26 /* don't break the lock on short read or a version mismatch */
27 return SQLITE_BUSY;
28 }
29 - usleep(10000000); /* wait 10 sec and try the lock again */
30 + sleep(10); /* wait 10 sec and try the lock again */
31 continue;
32 }
33