From 5d4f1408d0dd055d412ae44bb4a0f28f74617f05 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 2 Nov 2016 12:45:18 +0100 Subject: [PATCH] g10,w32: Fix build on Windows. * g10/tofu.c (begin_transaction): Use the new 'gnupg_usleep'. Signed-off-by: Justus Winter --- g10/tofu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/g10/tofu.c b/g10/tofu.c index 8280321d7..46d948402 100644 --- a/g10/tofu.c +++ b/g10/tofu.c @@ -192,7 +192,6 @@ begin_transaction (ctrl_t ctrl, int only_batch) && dbs->batch_update_started != gnupg_get_time ()) { struct stat statbuf; - struct timespec ts; /* If we are in a batch update, then batch updates better have been enabled. */ @@ -209,9 +208,7 @@ begin_transaction (ctrl_t ctrl, int only_batch) /* Yield to allow another process a chance to run. Note: * testing suggests that anything less than a 100ms tends to * not result in the other process getting the lock. */ - memset (&ts, 0, sizeof (ts)); - ts.tv_nsec = 100 * 1000 * 1000; - nanosleep (&ts, &ts); + gnupg_usleep (100000); } else dbs->batch_update_started = gnupg_get_time ();