Skip to content

Commit 26056fc

Browse files
author
duke
committed
Backport 44151f4
1 parent daa67f4 commit 26056fc

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

test/jdk/java/nio/file/attribute/BasicFileAttributeView/libCreationTimeHelper.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
#if defined(__linux__)
2626
#include <stdio.h>
2727
#include <string.h>
28+
#include <sys/types.h>
2829
#include <sys/stat.h>
29-
#include <bits/types.h>
3030
#include <dlfcn.h>
3131
#ifndef STATX_BASIC_STATS
3232
#define STATX_BASIC_STATS 0x000007ffU
@@ -44,13 +44,20 @@
4444
#define AT_FDCWD -100
4545
#endif
4646

47+
#ifndef __GLIBC__
48+
// Alpine doesn't know these types, define them
49+
typedef unsigned int __uint32_t;
50+
typedef unsigned short __uint16_t;
51+
typedef unsigned long int __uint64_t;
52+
#endif
53+
4754
/*
4855
* Timestamp structure for the timestamps in struct statx.
4956
*/
5057
struct my_statx_timestamp {
51-
__int64_t tv_sec;
58+
int64_t tv_sec;
5259
__uint32_t tv_nsec;
53-
__int32_t __reserved;
60+
int32_t __reserved;
5461
};
5562

5663
/*

0 commit comments

Comments
 (0)