daemon for no-MMU no-threads and CLONE_VM

Khem Raj raj.khem at gmail.com
Tue Aug 4 05:58:12 UTC 2009


On Mon, Aug 3, 2009 at 4:45 PM, Joseph S. Myers<joseph at codesourcery.com> wrote:
> I saw a problem building uClibc for a no-MMU, no-threads configuration
> where CLONE_VM was undefined when building daemon.
>
> CLONE_VM is defined in <bits/sched.h>.  A build with threads ends up
> including <sched.h> via <pthread.h> via <bits/uClibc_mutex.h>; this
> indirect include does not happen for a build without threads.  Does anyone
> see anything wrong with this patch to add an explicit <sched.h> include to
> daemon.c?

looks ok

>
> diff --git a/libc/unistd/daemon.c b/libc/unistd/daemon.c
> index 7894889..b18d618 100644
> --- a/libc/unistd/daemon.c
> +++ b/libc/unistd/daemon.c
> @@ -59,6 +59,7 @@
>
>  #ifndef __ARCH_USE_MMU__
>  #include <sys/syscall.h>
> +#include <sched.h>
>  /* use clone() to get fork() like behavior here -- we just want to disassociate
>  * from the controlling terminal
>  */
>
> --
> Joseph S. Myers
> joseph at codesourcery.com
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://lists.busybox.net/mailman/listinfo/uclibc
>


More information about the uClibc mailing list