only include libbsd header if libbsd is installed

This commit is contained in:
Georg Sauthoff 2016-11-15 21:43:45 +01:00
parent 808565e725
commit ee5bee4f2e

View file

@ -51,15 +51,16 @@
#include <sys/wait.h> /* wait() */
#include <ulimit.h> /* ulimit() */
#include <unistd.h> /* close(), dup2() */
// closefrom only available on Solaris/BSD
// closefrom only available on Solaris/BSD via system header
#include <stdlib.h> /* closefrom() */
#ifdef __linux
#include <bsd/unistd.h>
#endif
#include <libintl.h>
#include <config.h>
#if defined(__linux) && defined(HAVE_CLOSEFROM)
#include <bsd/unistd.h>
#endif
/*
* typedefs & structs
*/