From: Pavel Hrdina Date: Thu, 27 Sep 2018 10:19:17 +0000 (+0200) Subject: vircgroup: include system headers only on linux X-Git-Tag: v4.8.0-rc2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ef37ed3b8e7cc5fd83ff2b84bf08deea62d3bd0;p=thirdparty%2Flibvirt.git vircgroup: include system headers only on linux All the system headers are used only if we are compiling on linux and they all are present otherwise we would have seen build errors because in our tests/vircgrouptest.c we use only __linux__ to check whether to skip the cgroup tests or not. Reviewed-by: Ján Tomko Signed-off-by: Pavel Hrdina --- diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 7700a9f7a7..f90906e4ad 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -23,24 +23,23 @@ */ #include -#if defined HAVE_MNTENT_H && defined HAVE_SYS_MOUNT_H \ - && defined HAVE_GETMNTENT_R +#ifdef __linux__ # include # include -#endif -#include -#include - -#ifdef MAJOR_IN_MKDEV -# include -#elif MAJOR_IN_SYSMACROS -# include -#endif - -#include -#include -#include -#include +# include +# include + +# ifdef MAJOR_IN_MKDEV +# include +# elif MAJOR_IN_SYSMACROS +# include +# endif + +# include +# include +# include +# include +#endif /* __linux__ */ #define __VIR_CGROUP_ALLOW_INCLUDE_PRIV_H__ #include "vircgrouppriv.h"