From 44151f475fca3cf03299319b2ac9ddc533ba134d Mon Sep 17 00:00:00 2001 From: SendaoYan Date: Wed, 16 Oct 2024 16:27:57 +0000 Subject: [PATCH] 8342145: File libCreationTimeHelper.c compile fails on Alpine Reviewed-by: mbaesken --- .../BasicFileAttributeView/libCreationTimeHelper.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/jdk/java/nio/file/attribute/BasicFileAttributeView/libCreationTimeHelper.c b/test/jdk/java/nio/file/attribute/BasicFileAttributeView/libCreationTimeHelper.c index fb518b3b701..0686cc790da 100644 --- a/test/jdk/java/nio/file/attribute/BasicFileAttributeView/libCreationTimeHelper.c +++ b/test/jdk/java/nio/file/attribute/BasicFileAttributeView/libCreationTimeHelper.c @@ -25,8 +25,8 @@ #if defined(__linux__) #include #include +#include #include -#include #include #ifndef STATX_BASIC_STATS #define STATX_BASIC_STATS 0x000007ffU @@ -44,13 +44,20 @@ #define AT_FDCWD -100 #endif +#ifndef __GLIBC__ +// Alpine doesn't know these types, define them +typedef unsigned int __uint32_t; +typedef unsigned short __uint16_t; +typedef unsigned long int __uint64_t; +#endif + /* * Timestamp structure for the timestamps in struct statx. */ struct my_statx_timestamp { - __int64_t tv_sec; + int64_t tv_sec; __uint32_t tv_nsec; - __int32_t __reserved; + int32_t __reserved; }; /*