[gnome-build-meta/valentindavid/eos-installer: 6/6] Fix glib issue #2189
- From: Valentin David <valentindavid src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/valentindavid/eos-installer: 6/6] Fix glib issue #2189
- Date: Mon, 24 Aug 2020 07:46:39 +0000 (UTC)
commit 8b660b77cc672f9e05a54296d1c569b5df45fbd2
Author: Valentin David <valentin david codethink co uk>
Date: Sun Aug 23 16:44:48 2020 +0200
Fix glib issue #2189
elements/sdk/glib.bst | 2 ++
files/glib/gio_info_atime.patch | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
---
diff --git a/elements/sdk/glib.bst b/elements/sdk/glib.bst
index 78fedd3f..c65b9472 100644
--- a/elements/sdk/glib.bst
+++ b/elements/sdk/glib.bst
@@ -4,6 +4,8 @@ sources:
- kind: git_tag
url: gitlab_gnome_org:GNOME/glib.git
track: master
+- kind: patch
+ path: files/glib/gio_info_atime.patch
build-depends:
- sdk/gtk-doc.bst
diff --git a/files/glib/gio_info_atime.patch b/files/glib/gio_info_atime.patch
new file mode 100644
index 00000000..a41a660d
--- /dev/null
+++ b/files/glib/gio_info_atime.patch
@@ -0,0 +1,34 @@
+diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
+index a34c1b78a..0690e1da2 100644
+--- a/gio/glocalfileinfo.c
++++ b/gio/glocalfileinfo.c
+@@ -1025,13 +1025,16 @@ set_info_from_stat (GFileInfo *info,
+ #elif defined (HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)
+ _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_MODIFIED_USEC, _g_stat_mtim_nsec
(statbuf) / 1000);
+ #endif
+-
+- _g_file_info_set_attribute_uint64_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS, _g_stat_atime (statbuf));
++
++ if (_g_stat_has_field (statbuf, G_LOCAL_FILE_STAT_FIELD_ATIME))
++ {
++ _g_file_info_set_attribute_uint64_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS, _g_stat_atime
(statbuf));
+ #if defined (HAVE_STRUCT_STAT_ST_ATIMENSEC)
+- _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS_USEC,
statbuf->st_atimensec / 1000);
++ _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS_USEC,
statbuf->st_atimensec / 1000);
+ #elif defined (HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC)
+- _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS_USEC, _g_stat_atim_nsec
(statbuf) / 1000);
++ _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS_USEC,
_g_stat_atim_nsec (statbuf) / 1000);
+ #endif
++ }
+ #endif
+
+ #ifndef G_OS_WIN32
+@@ -1805,7 +1808,7 @@ _g_local_file_info_get (const char *basename,
+
+ res = g_local_file_lstat (path,
+ G_LOCAL_FILE_STAT_FIELD_BASIC_STATS | G_LOCAL_FILE_STAT_FIELD_BTIME,
+- G_LOCAL_FILE_STAT_FIELD_ALL & (~G_LOCAL_FILE_STAT_FIELD_BTIME),
++ G_LOCAL_FILE_STAT_FIELD_ALL & (~G_LOCAL_FILE_STAT_FIELD_BTIME) &
(~G_LOCAL_FILE_STAT_FIELD_ATIME),
+ &statbuf);
+
+ if (res == -1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]