diff --git a/libc/include/sys/stat.h b/libc/include/sys/stat.h index 4184f6c7f..623631ec4 100644 --- a/libc/include/sys/stat.h +++ b/libc/include/sys/stat.h @@ -40,7 +40,7 @@ __BEGIN_DECLS -#if defined(__aarch64__) +#if defined(__aarch64__) || defined(__riscv) #define __STAT64_BODY \ dev_t st_dev; \ ino_t st_ino; \ diff --git a/tests/headers/posix/sys_stat_h.c b/tests/headers/posix/sys_stat_h.c index b22e34fdf..a299426eb 100644 --- a/tests/headers/posix/sys_stat_h.c +++ b/tests/headers/posix/sys_stat_h.c @@ -69,7 +69,7 @@ static void sys_stat_h() { STRUCT_MEMBER(struct stat, struct timespec, st_mtim); STRUCT_MEMBER(struct stat, struct timespec, st_ctim); #if defined(__BIONIC__) -#if defined(__aarch64__) +#if defined(__aarch64__) || defined(__riscv) STRUCT_MEMBER(struct stat, int, st_blksize); #elif defined(__x86_64__) STRUCT_MEMBER(struct stat, long, st_blksize);