summaryrefslogtreecommitdiff
path: root/user/polkit/fix-consolekit-db-stat.patch
blob: d06ce7ae747d7ccb381ff293e80f1643194408d0 (plain) (blame)
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
--- polkit-0.105.orig/src/polkitbackend/polkitbackendsessionmonitor.c	2012-04-24 19:05:34.000000000 +0300
+++ polkit-0.105/src/polkitbackend/polkitbackendsessionmonitor.c	2015-08-17 14:50:51.428580856 +0300
@@ -48,7 +48,7 @@ struct _PolkitBackendSessionMonitor
 
   GKeyFile *database;
   GFileMonitor *database_monitor;
-  time_t database_mtime;
+  struct timespec database_mtim;
 };
 
 struct _PolkitBackendSessionMonitorClass
@@ -96,7 +96,7 @@ reload_database (PolkitBackendSessionMon
       goto out;
     }
 
-  monitor->database_mtime = statbuf.st_mtime;
+  monitor->database_mtim = statbuf.st_mtim;
 
   monitor->database = g_key_file_new ();
   if (!g_key_file_load_from_file (monitor->database,
@@ -132,7 +132,8 @@ ensure_database (PolkitBackendSessionMon
                        strerror (errno));
           goto out;
         }
-      if (statbuf.st_mtime == monitor->database_mtime)
+      if (statbuf.st_mtim.tv_sec  == monitor->database_mtim.tv_sec &&
+          statbuf.st_mtim.tv_nsec == monitor->database_mtim.tv_nsec)
         {
           ret = TRUE;
           goto out;