8342145: File libCreationTimeHelper.c compile fails on Alpine

Reviewed-by: mbaesken
This commit is contained in:
SendaoYan 2024-10-16 16:27:57 +00:00
parent 709914fc92
commit 44151f475f

View File

@ -25,8 +25,8 @@
#if defined(__linux__) #if defined(__linux__)
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <bits/types.h>
#include <dlfcn.h> #include <dlfcn.h>
#ifndef STATX_BASIC_STATS #ifndef STATX_BASIC_STATS
#define STATX_BASIC_STATS 0x000007ffU #define STATX_BASIC_STATS 0x000007ffU
@ -44,13 +44,20 @@
#define AT_FDCWD -100 #define AT_FDCWD -100
#endif #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. * Timestamp structure for the timestamps in struct statx.
*/ */
struct my_statx_timestamp { struct my_statx_timestamp {
__int64_t tv_sec; int64_t tv_sec;
__uint32_t tv_nsec; __uint32_t tv_nsec;
__int32_t __reserved; int32_t __reserved;
}; };
/* /*