summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/file.c4
-rw-r--r--ext/standard/filestat.c2
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);