From ee5bee4f2e236ee0de44223c7ce632096626d351 Mon Sep 17 00:00:00 2001 From: Georg Sauthoff Date: Tue, 15 Nov 2016 21:43:45 +0100 Subject: [PATCH] only include libbsd header if libbsd is installed --- lib/mksh/dosys.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/mksh/dosys.cc b/lib/mksh/dosys.cc index 68c9ca2..e8be6c4 100644 --- a/lib/mksh/dosys.cc +++ b/lib/mksh/dosys.cc @@ -51,15 +51,16 @@ #include /* wait() */ #include /* ulimit() */ #include /* close(), dup2() */ -// closefrom only available on Solaris/BSD +// closefrom only available on Solaris/BSD via system header #include /* closefrom() */ -#ifdef __linux - #include -#endif #include #include +#if defined(__linux) && defined(HAVE_CLOSEFROM) + #include +#endif + /* * typedefs & structs */