This repository was archived by the owner on Nov 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,11 @@ struct kernel_stat {
43
43
unsigned int st_pad1[3 ];
44
44
__kernel_off_t st_size;
45
45
unsigned int _st_atime;
46
- unsigned int st_atime_nsec ;
46
+ unsigned int _st_atime_nsec ;
47
47
unsigned int _st_mtime;
48
- unsigned int st_mtime_nsec ;
48
+ unsigned int _st_mtime_nsec ;
49
49
unsigned int _st_ctime;
50
- unsigned int st_ctime_nsec ;
50
+ unsigned int _st_ctime_nsec ;
51
51
unsigned int st_blksize;
52
52
unsigned int st_pad2;
53
53
unsigned long st_blocks;
@@ -65,11 +65,11 @@ static void copy_stat(struct stat* st, struct kernel_stat* s) {
65
65
st->st_blksize = static_cast <int >(s->st_blksize );
66
66
st->st_blocks = static_cast <long >(s->st_blocks );
67
67
st->st_atim .tv_sec = static_cast <time_t >(s->_st_atime );
68
- st->st_atim .tv_nsec = static_cast <long >(s->st_atime_nsec );
68
+ st->st_atim .tv_nsec = static_cast <long >(s->_st_atime_nsec );
69
69
st->st_mtim .tv_sec = static_cast <time_t >(s->_st_mtime );
70
- st->st_mtim .tv_nsec = static_cast <long >(s->st_mtime_nsec );
70
+ st->st_mtim .tv_nsec = static_cast <long >(s->_st_mtime_nsec );
71
71
st->st_ctim .tv_sec = static_cast <time_t >(s->_st_ctime );
72
- st->st_ctim .tv_nsec = static_cast <long >(s->st_ctime_nsec );
72
+ st->st_ctim .tv_nsec = static_cast <long >(s->_st_ctime_nsec );
73
73
}
74
74
75
75
int fstat (int fp, struct stat * st) {
Original file line number Diff line number Diff line change @@ -127,6 +127,10 @@ struct stat64 { __STAT64_BODY };
127
127
#define st_atimensec st_atim.tv_nsec
128
128
#define st_mtimensec st_mtim.tv_nsec
129
129
#define st_ctimensec st_ctim.tv_nsec
130
+ /* Compatibility with Linux headers and old NDKs. */
131
+ #define st_atime_nsec st_atim.tv_nsec
132
+ #define st_mtime_nsec st_mtim.tv_nsec
133
+ #define st_ctime_nsec st_ctim.tv_nsec
130
134
131
135
#if defined(__USE_BSD )
132
136
/* Permission macros provided by glibc for compatibility with BSDs. */
You can’t perform that action at this time.
0 commit comments