Bug #70999 [Com]: php_random_bytes: called object is not a function
| From: | cyrus at safe-mail dot net | Date: | Thu, 17 Dec 2015 09:38:56 +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-197964@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: No 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:
Provided fix works well.
Please commit/push to git...
Thanks
Previous Comments:
------------------------------------------------------------------------
[2015-12-13 04:22:20] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
------------------------------------------------------------------------
[2015-12-06 10:18:00] rainer dot jung at kippdata dot de
Problem also occurs on Solaris 10 (and will occur on every platform that has S_IFNAM defined). Patch
works well also on Solaris 10. Thanks.
------------------------------------------------------------------------
[2015-12-04 07:52:53] eugene at zhegan dot in
Same here, Solaris 11.2 x86. Patch does help, thanks a lot.
Build is successful.
------------------------------------------------------------------------
[2015-11-30 15:59:12] cyrus at safe-mail dot net
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!
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=70999
--
Edit this bug report at https://bugs.php.net/bug.php?id=70999&edit=1