xbps-fbulk: use _DEFAULT_SOURCE, required for wait3 in glibc 2.16.

Also these guards need to be defined before including anything.
This commit is contained in:
Leah Neukirchen 2017-08-07 16:08:15 +02:00
parent 66c6331689
commit 876f9f4a27

View File

@ -47,6 +47,8 @@
* Only one attempt is made to build any given package, no matter how many
* other packages depend on it.
*/
#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -59,9 +61,7 @@
#include <fcntl.h>
#include <sys/file.h>
#include <sys/stat.h>
#define _BSD_SOURCE
# include <sys/wait.h>
#undef _BSD_SOURCE
#include <sys/wait.h>
#include <getopt.h>
#include <xbps.h>