Drahflow/sfhttpd — pull request #1 by rohieb (2014-05-20 16:10:21+00:00)
Title: fix FTBFS with (e)glibc: sched.h needs _GNU_SOURCE to be defined for clone() etc.

According to `man 2 clone`, `_GNU_SOURCE` has to be defined in order for
`clone()` to be defined. Otherwise, on my Debian testing (running eglibc
2.18-5), I get:

´´´
$ make
gcc -W -Wall -O4 main.c -o sfhttpd
[...]
main.c: In function ‘main’:
main.c:122:3: warning: implicit declaration of function ‘clone’ [-Wimplicit-function-declaration]
if ((threads[nt].pid = clone(thr, stack += STACKSIZE,
^
main.c:123:5: error: ‘CLONE_FS’ undeclared (first use in this function)
CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_VM,
^
main.c:123:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:123:16: error: ‘CLONE_FILES’ undeclared (first use in this function)
CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_VM,
^
main.c:123:30: error: ‘CLONE_SIGHAND’ undeclared (first use in this function)
CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_VM,
^
main.c:123:46: error: ‘CLONE_VM’ undeclared (first use in this function)
CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_VM,
^
Makefile:7: recipe for target 'sfhttpd' failed
make: *** [sfhttpd] Error 1
´´´