mirror of
https://github.com/php/php-src.git
synced 2025-01-22 03:34:19 +08:00
MFH: Fixed #46059 (Compile failure under IRIX 6.5.30 building posix.c)
This commit is contained in:
parent
b6a4094c03
commit
a7279c4457
@ -31,4 +31,20 @@ int main(int argc, char *argv[])
|
||||
], [
|
||||
AC_MSG_RESULT([no, cannot detect working ttyname_r() when cross compiling. posix_ttyname() will be thread-unsafe])
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK([for utsname.domainname], ac_cv_have_utsname_domainname, [
|
||||
AC_TRY_COMPILE([
|
||||
#define _GNU_SOURCE
|
||||
#include <sys/utsname.h>
|
||||
],[
|
||||
return sizeof(((struct utsname *)0)->domainname);
|
||||
],[
|
||||
ac_cv_have_utsname_domainname=yes
|
||||
],[
|
||||
ac_cv_have_utsname_domainname=no
|
||||
])
|
||||
])
|
||||
if test ac_cv_have_utsname_domainname=yes; then
|
||||
AC_DEFINE(HAVE_UTSNAME_DOMAINNAME, 1, [Wether struct utsname has domainname])
|
||||
fi
|
||||
fi
|
||||
|
@ -667,7 +667,7 @@ PHP_FUNCTION(posix_uname)
|
||||
add_assoc_string(return_value, "version", u.version, 1);
|
||||
add_assoc_string(return_value, "machine", u.machine, 1);
|
||||
|
||||
#if defined(_GNU_SOURCE) && !defined(DARWIN)
|
||||
#if defined(_GNU_SOURCE) && !defined(DARWIN) && defined(HAVE_UTSNAME_DOMAINNAME)
|
||||
add_assoc_string(return_value, "domainname", u.domainname, 1);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user