From 6ef37ed3b8e7cc5fd83ff2b84bf08deea62d3bd0 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Thu, 27 Sep 2018 12:19:17 +0200 Subject: [PATCH] vircgroup: include system headers only on linux MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/util/vircgroup.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) 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" -- 2.47.2