diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-04-03 23:58:52 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-04-03 23:58:52 +0000 |
commit | 78c3dbc9cc4ac8defca2ccfd2b34e4b8e1518e83 (patch) | |
tree | 43a657cb8e9f63e101660298f06ac99892ca18c3 /libc | |
parent | a44fea3cff11bf65aec751dc949aa7f789eb8564 (diff) |
Accomodate mmuless systems.
Diffstat (limited to 'libc')
-rw-r--r-- | libc/unistd/daemon.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 + * <andersee@debian.org>, <andersen@lineo.com> + * * 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 <features.h> #include <fcntl.h> #include <paths.h> #include <unistd.h> @@ -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 } |