diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-03-15 20:05:30 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-03-15 20:05:30 +0000 |
commit | cebf82aaa6a0bd5b77849efddc3d28b97322987e (patch) | |
tree | d7e25e3bc75229601e4290fcdd6c6b0038d16310 | |
parent | 47726381571f6bee8963ed9ac1b809ed30b9abdf (diff) |
Fixed ticet #180: Failed compilation because usleep() does not return int on some *nix platforms (thanks Jukka-Pekka Kervinen)
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/pjproject-0.5-stable@1067 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjlib/src/pj/os_core_unix.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pjlib/src/pj/os_core_unix.c b/pjlib/src/pj/os_core_unix.c index a28af657..8fd65dc5 100644 --- a/pjlib/src/pj/os_core_unix.c +++ b/pjlib/src/pj/os_core_unix.c @@ -594,10 +594,13 @@ PJ_DEF(pj_status_t) pj_thread_sleep(unsigned msec) return PJ_RETURN_OS_ERROR(pj_get_native_os_error()); #else 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 */ } |