From b1a5aefcee338ba677c0a5fcbf19d01689f66eb3 Mon Sep 17 00:00:00 2001 From: Eric Blake <eblake@redhat.com> Date: Tue, 8 Mar 2011 21:43:26 -0700 Subject: [PATCH] build: fix build on cygwin On cygwin: CC libvirt_util_la-cgroup.lo util/cgroup.c: In function 'virCgroupKillRecursiveInternal': util/cgroup.c:1458: warning: implicit declaration of function 'virCgroupNew' [-Wimplicit-function-declaration] * src/util/cgroup.c (virCgroupKill): Don't build on platforms where virCgroupNew is unsupported. --- src/util/cgroup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/cgroup.c b/src/util/cgroup.c index c5b8cdd96a..8551acda0d 100644 --- a/src/util/cgroup.c +++ b/src/util/cgroup.c @@ -1308,7 +1308,7 @@ int virCgroupGetFreezerState(virCgroupPtr group, char **state) } -#ifdef HAVE_KILL +#if defined HAVE_KILL && defined HAVE_MNTENT_H && defined HAVE_GETMNTENT_R static int virCgroupKillInternal(virCgroupPtr group, int signum, virHashTablePtr pids) { int rc; @@ -1523,7 +1523,7 @@ int virCgroupKillPainfully(virCgroupPtr group) return rc; } -#else /* HAVE_KILL */ +#else /* !(HAVE_KILL, HAVE_MNTENT_H, HAVE_GETMNTENT_R) */ int virCgroupKill(virCgroupPtr group ATTRIBUTE_UNUSED, int signum ATTRIBUTE_UNUSED) { @@ -1539,4 +1539,4 @@ int virCgroupKillPainfully(virCgroupPtr group ATTRIBUTE_UNUSED) { return -ENOSYS; } -#endif /* HAVE_KILL */ +#endif /* HAVE_KILL, HAVE_MNTENT_H, HAVE_GETMNTENT_R */ -- GitLab