1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 04:05:40 +03:00
aports/testing/ocfs2-tools/musl-o2info-atimensec.patch
Jakub Jirutka 4f24ccb86c testing/ocfs2-tools: rewrite aport and upgrade to 1.8.5
Note: We use the same ("unofficial"?) upstream as Fedora.
2018-05-23 22:18:39 +02:00

35 lines
727 B
Diff

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
}