From: Wouter Verhelst Date: Thu, 22 Jul 2010 13:22:47 +0000 (+0200) Subject: Fix compile with -DNOFORK X-Git-Url: http://git.alex.org.uk Fix compile with -DNOFORK --- diff --git a/nbd-client.c b/nbd-client.c index 97c8048..7aceb3e 100644 --- a/nbd-client.c +++ b/nbd-client.c @@ -343,7 +343,9 @@ int main(int argc, char *argv[]) { #ifndef NOFORK if(!nofork) daemon(0,0); +#endif do { +#ifndef NOFORK if (fork()) { /* Due to a race, the kernel NBD driver cannot * call for a reread of the partition table