You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.1 KiB

  1. --- a/nss/lib/freebl/stubs.c
  2. +++ b/nss/lib/freebl/stubs.c
  3. @@ -503,7 +503,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. --- a/nss/lib/sqlite/sqlite3.c
  13. +++ b/nss/lib/sqlite/sqlite3.c
  14. @@ -39626,7 +39626,8 @@ static int proxyConchLock(unixFile *pFil
  15. if( nTries==1 ){
  16. conchModTime = buf.st_mtimespec;
  17. - usleep(500000); /* wait 0.5 sec and try the lock again*/
  18. + const struct timespec req = {0, 500 * 1000 * 1000};
  19. + nanosleep(&req, NULL); /* wait 0.5 sec and try the lock again*/
  20. continue;
  21. }
  22. @@ -39652,7 +39653,7 @@ static int proxyConchLock(unixFile *pFil
  23. /* don't break the lock on short read or a version mismatch */
  24. return SQLITE_BUSY;
  25. }
  26. - usleep(10000000); /* wait 10 sec and try the lock again */
  27. + sleep(10); /* wait 10 sec and try the lock again */
  28. continue;
  29. }