blob: 3e9dcaca3b258fae2f7a72245ce481218067f814 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Wed, 23 May 2018 21:01:00 +0200
Subject: [PATCH] Ensure compatibility with musl
The musl libc does not define macros st_{atim,mtim,ctim}ensec.
--- a/o2info/utils.c
+++ b/o2info/utils.c
@@ -334,7 +334,7 @@
#else
struct timespec t;
t.tv_sec = st->st_atime;
- t.tv_nsec = st->st_atimensec;
+ t.tv_nsec = st->st_atim.tv_nsec;
return t;
#endif
}
@@ -346,7 +346,7 @@
#else
struct timespec t;
t.tv_sec = st->st_mtime;
- t.tv_nsec = st->st_mtimensec;
+ t.tv_nsec = st->st_mtim.tv_nsec;
return t;
#endif
}
@@ -358,7 +358,7 @@
#else
struct timespec t;
t.tv_sec = st->st_ctime;
- t.tv_nsec = st->st_ctimensec;
+ t.tv_nsec = st->st_ctim.tv_nsec;
return t;
#endif
}
|