提交 1b60f1b4 编写于 作者: J Jasper Lievisse Adriaanse 提交者: Roman Bogorodskiy

cgroup: don't include sys/mount.h if not needed

As cgroup implementation only works on Linux, it does not
make much sense to include sys/mount.h if other requirements are
not met, such as HAVE_MNTENT_H and HAVE_GETMNTENT_R.

Also, it fixes build on OpenBSD that requires to include sys/param.h
along with sys/mount.h.
Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
上级 f7d0f124
......@@ -24,10 +24,9 @@
#include <config.h>
#include <stdio.h>
#if defined HAVE_MNTENT_H && defined HAVE_GETMNTENT_R
#if defined HAVE_MNTENT_H && defined HAVE_SYS_MOUNT_H \
&& defined HAVE_GETMNTENT_R
# include <mntent.h>
#endif
#if defined HAVE_SYS_MOUNT_H
# include <sys/mount.h>
#endif
#include <fcntl.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册