summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorEarlopain <[email protected]>2025-06-09 13:19:08 +0200
committerNobuyoshi Nakada <[email protected]>2025-06-09 21:22:36 +0900
commit96fdaf2e393933fdd128cd1a41fa9b2062792a15 (patch)
tree09ea6fda229bce9bd2b87027e92e5d71b694b75f /file.c
parentf4135feafc558111c7388b823a64652e09999161 (diff)
Fix build on alpine with statx change
Since https://github.com/ruby/ruby/commit/18a036a6133bd141dfc25cd48ced9a2b78826af6 building on alpine fails because usage of `__u32`, which is not portable. > file.c: In function 'rb_stat_new': > file.c:546:33: error: '__u32' undeclared (first use in this function) > # define CP_32(m) .stx_ ## m = (__u32)st->st_ ## m
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13562
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index b38cd67199..322df6dbec 100644
--- a/file.c
+++ b/file.c
@@ -543,7 +543,7 @@ rb_stat_new(const struct stat *st)
if (st) {
#if RUBY_USE_STATX
# define CP(m) .stx_ ## m = st->st_ ## m
-# define CP_32(m) .stx_ ## m = (__u32)st->st_ ## m
+# define CP_32(m) .stx_ ## m = (uint32_t)st->st_ ## m
# define CP_TS(m) .stx_ ## m = stat_ ## m ## spec(st)
rb_st->stat = (struct statx){
.stx_mask = STATX_BASIC_STATS,