[MacPorts] #61168: php72-apache2handler 7.2.33_0 does not build
MacPorts
noreply at macports.org
Sat Sep 12 22:17:49 UTC 2020
#61168: php72-apache2handler 7.2.33_0 does not build
--------------------------+------------------------
Reporter: josephsacco | Owner: ryandesign
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.6.3
Resolution: | Keywords:
Port: php |
--------------------------+------------------------
Description changed by ryandesign:
Old description:
> There is a problem building the latest upgrades for php-apache2hander
> [php72 & php73; php74 is OK] under OS X 10.15.6:
>
> {{{
> /main/reentrancy.c:139:23: error: too few arguments to function call,
> expected 3, have 2
> readdir_r(dirp, entry);
> ~~~~~~~~~ ^
> /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/dirent.h:110:1:
> note: 'readdir_r' declared here
> int readdir_r(DIR *, struct dirent *, struct dirent **)
> __DARWIN_INODE64(readdir_r);
> ^
> 1 error generated.
> }}}
>
> Looking at the source code, the problem is here:
>
> {{{
> #if !defined(HAVE_POSIX_READDIR_R)
>
> PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry,
> struct dirent **result)
> {
> #if defined(HAVE_OLD_READDIR_R)
> int ret = 0;
>
> /* We cannot rely on the return value of readdir_r
> as it differs between various platforms
> (HPUX returns 0 on success whereas Solaris returns non-zero)
> */
> entry->d_name[0] = '\0';
> readdir_r(dirp, entry);
>
> if (entry->d_name[0] == '\0') {
> *result = NULL;
> ret = errno;
> } else {
> *result = entry;
> }
> return ret;
> #else
> struct dirent *ptr;
> int ret = 0;
>
> local_lock(READDIR_R);
>
> errno = 0;
>
> ptr = readdir(dirp);
>
> if (!ptr && errno != 0)
> ret = errno;
>
> if (ptr)
> memcpy(entry, ptr, sizeof(*ptr));
>
> *result = ptr;
>
> local_unlock(READDIR_R);
>
> return ret;
> #endif}}}
>
> -Joseph
New description:
There is a problem building the latest upgrades for php-apache2hander
[php72 & php73; php74 is OK] under OS X 10.15.6:
{{{
/main/reentrancy.c:139:23: error: too few arguments to function call,
expected 3, have 2
readdir_r(dirp, entry);
~~~~~~~~~ ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/dirent.h:110:1:
note: 'readdir_r' declared here
int readdir_r(DIR *, struct dirent *, struct dirent **)
__DARWIN_INODE64(readdir_r);
^
1 error generated.
}}}
Looking at the source code, the problem is here:
{{{
#if !defined(HAVE_POSIX_READDIR_R)
PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry,
struct dirent **result)
{
#if defined(HAVE_OLD_READDIR_R)
int ret = 0;
/* We cannot rely on the return value of readdir_r
as it differs between various platforms
(HPUX returns 0 on success whereas Solaris returns non-zero)
*/
entry->d_name[0] = '\0';
readdir_r(dirp, entry);
if (entry->d_name[0] == '\0') {
*result = NULL;
ret = errno;
} else {
*result = entry;
}
return ret;
#else
struct dirent *ptr;
int ret = 0;
local_lock(READDIR_R);
errno = 0;
ptr = readdir(dirp);
if (!ptr && errno != 0)
ret = errno;
if (ptr)
memcpy(entry, ptr, sizeof(*ptr));
*result = ptr;
local_unlock(READDIR_R);
return ret;
#endif
}}}
-Joseph
--
--
Ticket URL: <https://trac.macports.org/ticket/61168#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list