From 78c3dbc9cc4ac8defca2ccfd2b34e4b8e1518e83 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 3 Apr 2001 23:58:52 +0000 Subject: Accomodate mmuless systems. --- libc/unistd/daemon.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libc/unistd/daemon.c') diff --git a/libc/unistd/daemon.c b/libc/unistd/daemon.c index 2bd9f6f76..4542f51f8 100644 --- a/libc/unistd/daemon.c +++ b/libc/unistd/daemon.c @@ -5,6 +5,9 @@ * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * + * Modified for uClibc by Erik Andersen + * , + * * The uClibc Library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the @@ -23,6 +26,7 @@ * Original copyright notice is retained at the end of this file. */ +#include #include #include #include @@ -30,6 +34,7 @@ int daemon( int nochdir, int noclose ) { +#if __UCLIBC_HAS_MMU__ int fd; switch (fork()) { @@ -55,6 +60,10 @@ int daemon( int nochdir, int noclose ) close(fd); } return(0); +#else + fprintf(stderr, "Sorry, daemon() requires an MMU\n"); + return(-1); +#endif } -- cgit v1.2.3