glocalfileinfo: Always define _g_stat_mtim_nsec, etc.

If these struct members aren't available, we can be more like an
abstraction layer by falling back to yielding 0.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2022-02-21 16:58:08 +00:00
parent 94f3bb7074
commit 6517bbfbc3

View File

@ -326,6 +326,10 @@ inline static time_t _g_stat_mtime (const GLocalFileStat *buf) { return b
inline static guint32 _g_stat_atim_nsec (const GLocalFileStat *buf) { return buf->st_atim.tv_nsec; }
inline static guint32 _g_stat_ctim_nsec (const GLocalFileStat *buf) { return buf->st_ctim.tv_nsec; }
inline static guint32 _g_stat_mtim_nsec (const GLocalFileStat *buf) { return buf->st_mtim.tv_nsec; }
#else
inline static guint32 _g_stat_atim_nsec (const GLocalFileStat *buf) { return 0; }
inline static guint32 _g_stat_ctim_nsec (const GLocalFileStat *buf) { return 0; }
inline static guint32 _g_stat_mtim_nsec (const GLocalFileStat *buf) { return 0; }
#endif
#endif /* !HAVE_STATX */