Bug #70999 [Fbk->NoF]: php_random_bytes: called object is not a function

From: Date: Sun, 13 Dec 2015 04:22:21 +0000
Subject: Bug #70999 [Fbk->NoF]: php_random_bytes: called object is not a function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197841@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 Updated by: php-bugs@lists.php.net Reported by: cyrus at safe-mail dot net Summary: php_random_bytes: called object is not a function -Status: Feedback +Status: No Feedback Type: Bug Package: Compile Failure Operating System: Solaris 11 (x86 and sparc) PHP Version: 7.0.0RC8 Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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 ------------------------------------------------------------------------ [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

« previous php.bugs (#197841) next »