aboutsummaryrefslogtreecommitdiffstats
path: root/g10/tofu.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-10-20 14:38:06 +0000
committerWerner Koch <[email protected]>2020-10-20 14:38:06 +0000
commit18e5dd7b03ced51611c9ba1345cf498a0aaf14a6 (patch)
treefaeb1e27f9ffdb049f2e0dec728229d9fd7703b6 /g10/tofu.c
parentReplace most calls to open by a new wrapper. (diff)
downloadgnupg-18e5dd7b03ced51611c9ba1345cf498a0aaf14a6.tar.gz
gnupg-18e5dd7b03ced51611c9ba1345cf498a0aaf14a6.zip
Replace all calls to stat by gnupg_stat.
* common/sysutils.c (gnupg_stat): New. * common/sysutils.h: Include sys/stat.h. -- Yet another wrapper for Unicode support on Windows. GnuPG-bug-id: 5098 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/tofu.c')
-rw-r--r--g10/tofu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/tofu.c b/g10/tofu.c
index 2eda1ff30..f49083844 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -197,7 +197,7 @@ begin_transaction (ctrl_t ctrl, int only_batch)
/* Check if another process wants to run. (We just ignore any
* stat failure. A waiter might have to wait a bit longer, but
* otherwise there should be no impact.) */
- if (stat (dbs->want_lock_file, &statbuf) == 0
+ if (gnupg_stat (dbs->want_lock_file, &statbuf) == 0
&& statbuf.st_ctime != dbs->want_lock_file_ctime)
{
end_transaction (ctrl, 2);
@@ -237,7 +237,7 @@ begin_transaction (ctrl_t ctrl, int only_batch)
dbs->in_batch_transaction = 1;
dbs->batch_update_started = gnupg_get_time ();
- if (stat (dbs->want_lock_file, &statbuf) == 0)
+ if (gnupg_stat (dbs->want_lock_file, &statbuf) == 0)
dbs->want_lock_file_ctime = statbuf.st_ctime;
}