|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49809 time_sleep_until is not available on solaris
Submitted: 2009-10-08 08:23 UTC Modified: 2009-10-08 14:22 UTC
From: sriram dot natarajan at gmail dot com Assigned: jani
Status: Closed Package: Compile Failure
PHP Version: 5.3SVN-2009-10-08 (SVN) OS: solaris
Private report: No CVE-ID:
 [2009-10-08 08:23 UTC] sriram dot natarajan at gmail dot com
while investigating another bug, i noticed that time_sleep_until function is not available on opensolaris.
While debugging, I realized that solaris defines the time related functions within -lrt and PHP_CHECK_FUNCS macros is not able to correctly identify that this function is available within system . because of this, nanosleep dependent API is disabled on this platform

Reproduce code:
time_sleep_until function is not available in solaris / opensolaris

Expected result:
this function should be available on platforms where nanosleep is available.

Actual result:
time_sleep_until or other nanosleep dependent functions are not available


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-08 08:28 UTC]
here is a patch against (for 5.3) that addresses this issue. pl. let me know,if this looks ok. 

---        (revision 289333)
+++        (working copy)
@@ -621,13 +621,14 @@
 unlockpt \
 unsetenv \
 usleep \
-nanosleep \
 utime \
 vsnprintf \
 vasprintf \
 asprintf \
+PHP_CHECK_FUNC(nanosleep, c, rt)
 dnl Check for getaddrinfo, should be a better way, but...
 dnl Also check for working getaddrinfo
 AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,

if no one has any objections, i can commit this patch
 [2009-10-08 14:16 UTC]
The PHP_CHECK_FUNC does the libc check automatically, you don't need to put it there separately. Assigning to myself.
 [2009-10-08 14:21 UTC]
Automatic comment from SVN on behalf of jani
Log: - Fixed bug #49809 (time_sleep_until is not available on solaris)
 [2009-10-08 14:22 UTC]
 [2009-10-15 21:06 UTC]
Automatic comment from SVN on behalf of pajoye
Log: - Merge: #49809 (time_sleep_until is not available on solaris)
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Sun Oct 04 21:01:30 2015 UTC