diff options
author | Sascha Schumann <sas@php.net> | 2001-02-21 07:18:28 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2001-02-21 07:18:28 +0000 |
commit | 47f7795594af4a3b3eaaac9fad2f813a514e0e2d (patch) | |
tree | f7dacb136a52c489b32126d7422a4375292e5e60 /ext | |
parent | e8ef0d8b2c23667140d1c02a924ef60d7bf210fc (diff) | |
download | php-git-47f7795594af4a3b3eaaac9fad2f813a514e0e2d.tar.gz |
Correctly check for the existence of the st_rdev field.
Note that this field is required to exist for SUSv3 conformance.
Submitted by: amra@us.ibm.com
PR: #9358
Diffstat (limited to 'ext')
-rw-r--r-- | ext/standard/file.c | 4 | ||||
-rw-r--r-- | ext/standard/filestat.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c index e264e94995..6f8b05e351 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1624,8 +1624,10 @@ PHP_NAMED_FUNCTION(php_if_fstat) add_assoc_long ( return_value , "uid" , stat_sb.st_uid ); add_assoc_long ( return_value , "gid" , stat_sb.st_gid ); -#ifdef HAVE_ST_BLKSIZE +#ifdef HAVE_ST_RDEV add_assoc_long ( return_value, "rdev" , stat_sb.st_rdev ); +#endif +#ifdef HAVE_ST_BLKSIZE add_assoc_long ( return_value , "blksize" , stat_sb.st_blksize ); #endif diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 92cbee6e79..819841f82a 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -593,7 +593,7 @@ static void php_stat(const char *filename, int type, pval *return_value) add_next_index_long(return_value, stat_sb->st_nlink); add_next_index_long(return_value, stat_sb->st_uid); add_next_index_long(return_value, stat_sb->st_gid); -#ifdef HAVE_ST_BLKSIZE +#ifdef HAVE_ST_RDEV add_next_index_long(return_value, stat_sb->st_rdev); #else add_next_index_long(return_value, -1); |