php.net |  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 (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.3SVN-2009-10-08 (SVN) OS: solaris
Private report: No CVE-ID: None
 [2009-10-08 08:23 UTC] sriram dot natarajan at gmail dot com
Description:
------------
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

Index: configure.in
===================================================================
--- configure.in        (revision 289333)
+++ configure.in        (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] jani@php.net
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] svn@php.net
Automatic comment from SVN on behalf of jani
Revision: http://svn.php.net/viewvc/?view=revision&revision=289341
Log: - Fixed bug #49809 (time_sleep_until is not available on solaris)
 [2009-10-08 14:22 UTC] jani@php.net
Fixed.
 [2009-10-15 21:06 UTC] svn@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=289685
Log: - Merge: #49809 (time_sleep_until is not available on solaris)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 09:01:30 2024 UTC