[glib: 4/5] glocalfileinfo: Add missing _g_stat_*() methods for win32
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/5] glocalfileinfo: Add missing _g_stat_*() methods for win32
- Date: Mon, 21 Feb 2022 13:48:55 +0000 (UTC)
commit 01a432d6ffcbe9c7593fc596797516ee03574ddb
Author: Philip Withnall <pwithnall endlessos org>
Date: Fri Feb 18 13:50:19 2022 +0000
glocalfileinfo: Add missing _g_stat_*() methods for win32
Signed-off-by: Philip Withnall <pwithnall endlessos org>
gio/glocalfileinfo.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gio/glocalfileinfo.h b/gio/glocalfileinfo.h
index 5ca0d9be3..43d54af78 100644
--- a/gio/glocalfileinfo.h
+++ b/gio/glocalfileinfo.h
@@ -317,8 +317,12 @@ inline static blkcnt_t _g_stat_blocks (const GLocalFileStat *buf) { return b
inline static time_t _g_stat_atime (const GLocalFileStat *buf) { return buf->st_atime; }
inline static time_t _g_stat_ctime (const GLocalFileStat *buf) { return buf->st_ctime; }
inline static time_t _g_stat_mtime (const GLocalFileStat *buf) { return buf->st_mtime; }
+#else
+inline static time_t _g_stat_atime (const GLocalFileStat *buf) { return buf->st_atim.tv_sec; }
+inline static time_t _g_stat_ctime (const GLocalFileStat *buf) { return buf->st_ctim.tv_sec; }
+inline static time_t _g_stat_mtime (const GLocalFileStat *buf) { return buf->st_mtim.tv_sec; }
#endif
-#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
+#if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) || defined(G_OS_WIN32)
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; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]