From 9706f481dbb779257e427dae422ac28673381383 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 14 Mar 2010 20:07:58 +0100 Subject: [PATCH] tdb: Fix bug 7248, avoid the nanosleep dependency --- lib/tdb/tools/tdbtorture.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/tdb/tools/tdbtorture.c b/lib/tdb/tools/tdbtorture.c index 5ee6991..eda79f8 100644 --- a/lib/tdb/tools/tdbtorture.c +++ b/lib/tdb/tools/tdbtorture.c @@ -355,12 +355,12 @@ int main(int argc, char * const *argv) pid = waitpid(-1, &status, kill_random ? WNOHANG : 0); if (pid == 0) { - struct timespec ts; + struct timeval tv; /* Sleep for 1/10 second. */ - ts.tv_sec = 0; - ts.tv_nsec = 100000000; - nanosleep(&ts, NULL); + tv.tv_sec = 0; + tv.tv_usec = 100000; + select(0, NULL, NULL, NULL, &tv); /* Kill someone. */ kill(pids[random() % num_procs], SIGUSR1); -- 1.6.0.4