提交 b1a5aefc 编写于 作者: E Eric Blake

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.
上级 7e07a401
...@@ -1308,7 +1308,7 @@ int virCgroupGetFreezerState(virCgroupPtr group, char **state) ...@@ -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) static int virCgroupKillInternal(virCgroupPtr group, int signum, virHashTablePtr pids)
{ {
int rc; int rc;
...@@ -1523,7 +1523,7 @@ int virCgroupKillPainfully(virCgroupPtr group) ...@@ -1523,7 +1523,7 @@ int virCgroupKillPainfully(virCgroupPtr group)
return rc; return rc;
} }
#else /* HAVE_KILL */ #else /* !(HAVE_KILL, HAVE_MNTENT_H, HAVE_GETMNTENT_R) */
int virCgroupKill(virCgroupPtr group ATTRIBUTE_UNUSED, int virCgroupKill(virCgroupPtr group ATTRIBUTE_UNUSED,
int signum ATTRIBUTE_UNUSED) int signum ATTRIBUTE_UNUSED)
{ {
...@@ -1539,4 +1539,4 @@ int virCgroupKillPainfully(virCgroupPtr group ATTRIBUTE_UNUSED) ...@@ -1539,4 +1539,4 @@ int virCgroupKillPainfully(virCgroupPtr group ATTRIBUTE_UNUSED)
{ {
return -ENOSYS; return -ENOSYS;
} }
#endif /* HAVE_KILL */ #endif /* HAVE_KILL, HAVE_MNTENT_H, HAVE_GETMNTENT_R */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部