8342145: File libCreationTimeHelper.c compile fails on Alpine

Backport-of: 44151f475fca3cf03299319b2ac9ddc533ba134d
This commit is contained in:
SendaoYan 2024-10-18 19:43:28 +00:00 committed by Martin Doerr
parent 14aedb575c
commit dc5298e930

View File

@ -25,8 +25,8 @@
#if defined(__linux__)
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <bits/types.h>
#include <dlfcn.h>
#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;
};
/*