Fixed ticket #181: Failed compilation because usleep() does not return int on some *nix platforms (thanks Jukka-Pekka Kervinen)
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1068 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
de47956784
commit
4a5af681b8
|
@ -594,10 +594,13 @@ PJ_DEF(pj_status_t) pj_thread_sleep(unsigned msec)
|
||||||
return PJ_RETURN_OS_ERROR(pj_get_native_os_error());
|
return PJ_RETURN_OS_ERROR(pj_get_native_os_error());
|
||||||
#else
|
#else
|
||||||
PJ_CHECK_STACK();
|
PJ_CHECK_STACK();
|
||||||
if (usleep(msec * 1000) == 0)
|
|
||||||
return PJ_SUCCESS;
|
|
||||||
|
|
||||||
return PJ_RETURN_OS_ERROR(pj_get_native_os_error());
|
pj_set_os_error(0);
|
||||||
|
|
||||||
|
usleep(msec * 1000);
|
||||||
|
|
||||||
|
return pj_get_os_error();
|
||||||
|
;
|
||||||
#endif /* PJ_RTEMS */
|
#endif /* PJ_RTEMS */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue