blob: 36f67b7084d5dd4e1cb51e81c78790fdc97c808c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--- a/nss/lib/freebl/stubs.c
+++ b/nss/lib/freebl/stubs.c
@@ -500,7 +500,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;
}
|