summaryrefslogtreecommitdiff
path: root/ext/phar/func_interceptors.c
diff options
context:
space:
mode:
authorPeter Kokot <petk@php.net>2018-07-29 13:12:33 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-07-29 13:59:40 +0200
commitd2184efb7be1b3bfb355e4a6e671ceacc3896eeb (patch)
tree0b241432aacd67a34c016f440e158d112e5c51e4 /ext/phar/func_interceptors.c
parentd7ad4babe0f3d1d050b7acbdb2b43794653de47f (diff)
downloadphp-git-d2184efb7be1b3bfb355e4a6e671ceacc3896eeb.tar.gz
Replace obsolete AC_STRUCT_ST_BLKSIZE and AC_STRUCT_ST_RDEV
Autoconf 2.50 released in 2001 has made several macros obsolete. Instead of the AC_STRUCT_ST_BLKSIZE and AC_STRUCT_ST_RDEV the new AC_CHECK_MEMBERS should be used. When checking for the presence of stat struct members st_blkzize and st_rdev the new AC_CHECK_MEMBERS macro defines new constants HAVE_STRUCT_STAT_ST_BLKSIZE and HAVE_STRUCT_STAT_ST_RDEV. Old constants HAVE_ST_BLKSIZE and HAVE_ST_RDEV need to be replaced respectively in PHP code (this patch) and in PHP extenstions if they use them. PHP 5.4 to 7.1 require Autoconf 2.59+ version, PHP 7.2 and above require 2.64+ version, and the PHP 7.2 phpize script requires 2.59+ version which are all greater than above mentioned 2.50 version.
Diffstat (limited to 'ext/phar/func_interceptors.c')
-rw-r--r--ext/phar/func_interceptors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c
index 794002b6ab..d9d8b04836 100644
--- a/ext/phar/func_interceptors.c
+++ b/ext/phar/func_interceptors.c
@@ -526,7 +526,7 @@ static void phar_fancy_stat(zend_stat_t *stat_sb, int type, zval *return_value)
ZVAL_LONG(&stat_nlink, stat_sb->st_nlink);
ZVAL_LONG(&stat_uid, stat_sb->st_uid);
ZVAL_LONG(&stat_gid, stat_sb->st_gid);
-#ifdef HAVE_ST_RDEV
+#ifdef HAVE_STRUCT_STAT_ST_RDEV
ZVAL_LONG(&stat_rdev, stat_sb->st_rdev);
#else
ZVAL_LONG(&stat_rdev, -1);
@@ -535,7 +535,7 @@ static void phar_fancy_stat(zend_stat_t *stat_sb, int type, zval *return_value)
ZVAL_LONG(&stat_atime, stat_sb->st_atime);
ZVAL_LONG(&stat_mtime, stat_sb->st_mtime);
ZVAL_LONG(&stat_ctime, stat_sb->st_ctime);
-#ifdef HAVE_ST_BLKSIZE
+#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
ZVAL_LONG(&stat_blksize, stat_sb->st_blksize);
#else
ZVAL_LONG(&stat_blksize,-1);