Skip to content

Commit 96fdaf2

Browse files
Earlopainnobu
authored andcommitted
Fix build on alpine with statx change
Since ruby@18a036a 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
1 parent f4135fe commit 96fdaf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ rb_stat_new(const struct stat *st)
543543
if (st) {
544544
#if RUBY_USE_STATX
545545
# define CP(m) .stx_ ## m = st->st_ ## m
546-
# define CP_32(m) .stx_ ## m = (__u32)st->st_ ## m
546+
# define CP_32(m) .stx_ ## m = (uint32_t)st->st_ ## m
547547
# define CP_TS(m) .stx_ ## m = stat_ ## m ## spec(st)
548548
rb_st->stat = (struct statx){
549549
.stx_mask = STATX_BASIC_STATS,

0 commit comments

Comments
 (0)