Bug #70999 [Com]: php_random_bytes: called object is not a function
| From: | cyrus at safe-mail dot net | Date: | Mon, 30 Nov 2015 15:59:13 +0000 |
| Subject: | Bug #70999 [Com]: php_random_bytes: called object is not a function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-197524@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70999&edit=1
ID: 70999
Comment by: cyrus at safe-mail dot net
Reported by: cyrus at safe-mail dot net
Summary: php_random_bytes: called object is not a function
Status: Feedback
Type: Bug
Package: Compile Failure
Operating System: Solaris 11 (x86 and sparc)
PHP Version: 7.0.0RC8
Block user comment: N
Private report: N
New Comment:
This fix works well with Solaris 11 x86.
It seems it works also with Solaris 11 sparc.
I discovered another error, but in my eyes it did not stand in relation to this issue.
Is it possible to include this fix in next or final release?
THX a lot!
Previous Comments:
------------------------------------------------------------------------
[2015-11-30 12:04:43] laruence@php.net
I delete my wrong comments, anyway, here comes the right one , could you please try does this path
works?
diff --git a/ext/standard/random.c b/ext/standard/random.c
index 7056879..43e2984 100644
--- a/ext/standard/random.c
+++ b/ext/standard/random.c
@@ -145,7 +145,7 @@ static int php_random_bytes(void *bytes, size_t size)
/* Does the file exist and is it a character device? */
if (fstat(fd, &st) != 0 ||
# ifdef S_IFNAM
- !(S_IFNAM(st.st_mode) || S_ISCHR(st.st_mode))
+ !((((st.st_mode) & S_IFNAM) == S_IFNAM) || S_ISCHR(st.st_mode))
# else
!S_ISCHR(st.st_mode)
# endif
------------------------------------------------------------------------
[2015-11-30 10:54:37] cyrus at safe-mail dot net
Description:
------------
<path>/php-7.0.0RC8/ext/standard/random.c: In function 'php_random_bytes':
<path>/php-7.0.0RC8/ext/standard/random.c:145:26: error: called object '20480' is
not a function
*** Error code 1
make: Fatal error: Command failed for target `ext/standard/random.lo'
----------
occurs only on Solaris (x86/sparc)
works well on RHEL 6/7
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70999&edit=1