summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-04-12 14:42:26 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-04-12 15:32:49 +0900
commita5688b5ce6e87a5b881a4d52d4e59b6fe807e807 (patch)
treeecd93ebe97fd601134c612042533dc4c4ab8a418 /configure.ac
parent799ea1d1540aca03542ee31647052343507a4b41 (diff)
downloadruby-a5688b5ce6e87a5b881a4d52d4e59b6fe807e807.tar.gz
Support non-standard `struct stat` [Bug #17793]
On 32-bit Android: * `st_dev`/`st_rdev` are not `dev_t` * `st_mode` is not `mode_t`
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6fe43bfc8d..27899f751d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1693,6 +1693,7 @@ RUBY_CHECK_SIGNEDNESS(size_t, [AC_MSG_ERROR(size_t is signed)], [],
[@%:@include <sys/types.h>])
RUBY_CHECK_SIZEOF(size_t, [int long void*], [], [@%:@include <sys/types.h>])
RUBY_CHECK_SIZEOF(ptrdiff_t, size_t, [], [@%:@include <stddef.h>])
+RUBY_CHECK_SIZEOF(dev_t)
RUBY_CHECK_PRINTF_PREFIX(size_t, z)
RUBY_CHECK_PRINTF_PREFIX(ptrdiff_t, t)
AC_CHECK_MEMBERS([struct stat.st_blksize])
@@ -1703,6 +1704,10 @@ AS_IF([test "$ac_cv_member_struct_stat_st_blocks" = yes], [
RUBY_CHECK_SIZEOF([struct stat.st_blocks], [off_t int long "long long"], [], [@%:@include <sys/stat.h>])
])
RUBY_CHECK_SIZEOF([struct stat.st_ino], [long "long long"], [], [@%:@include <sys/stat.h>])
+RUBY_CHECK_SIZEOF([struct stat.st_dev], [dev_t int long "long long"], [], [@%:@include <sys/stat.h>])
+AS_IF([test "$ac_cv_member_struct_stat_st_rdev" = yes], [
+ RUBY_CHECK_SIZEOF([struct stat.st_rdev], [dev_t int long "long long"], [], [@%:@include <sys/stat.h>])
+])
AC_CHECK_MEMBERS([struct stat.st_atim])
AC_CHECK_MEMBERS([struct stat.st_atimespec])
AC_CHECK_MEMBERS([struct stat.st_atimensec])