mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 09:55:18 +00:00
build: fix mingw build of virprocess.c
Commit 776d49f4 added a static function that is only called conditionally; leading to this compile error on mingw: CC libvirt_util_la-virprocess.lo ../../src/util/virprocess.c:624:26: error: 'struct rlimit' declared inside parameter list [-Werror] ../../src/util/virprocess.c:624:26: error: its scope is only this definition or declaration, which is probably not what you want [-Werror] ../../src/util/virprocess.c:622:1: error: 'virProcessPrLimit' defined but not used [-Werror=unused-function] * src/util/virprocess.c (virProcessPrLimit): Only declare virProcessPrLimit when used. Signed-off-by: Eric Blake <eblake@redhat.com> (cherry picked from commit 05f79a3894a04b305c18993bedf117c6b6e41d52)
This commit is contained in:
parent
3b9243e018
commit
6381c1c130
@ -616,7 +616,7 @@ virProcessPrLimit(pid_t pid, int resource, struct rlimit *rlim)
|
|||||||
{
|
{
|
||||||
return prlimit(pid, resource, rlim, NULL);
|
return prlimit(pid, resource, rlim, NULL);
|
||||||
}
|
}
|
||||||
#else /* ! HAVE_PRLIMIT */
|
#elif HAVE_SETRLIMIT
|
||||||
static int
|
static int
|
||||||
virProcessPrLimit(pid_t pid ATTRIBUTE_UNUSED,
|
virProcessPrLimit(pid_t pid ATTRIBUTE_UNUSED,
|
||||||
int resource ATTRIBUTE_UNUSED,
|
int resource ATTRIBUTE_UNUSED,
|
||||||
@ -625,7 +625,7 @@ virProcessPrLimit(pid_t pid ATTRIBUTE_UNUSED,
|
|||||||
errno = ENOSYS;
|
errno = ENOSYS;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif /* ! HAVE_PRLIMIT */
|
#endif
|
||||||
|
|
||||||
#if HAVE_SETRLIMIT && defined(RLIMIT_MEMLOCK)
|
#if HAVE_SETRLIMIT && defined(RLIMIT_MEMLOCK)
|
||||||
int
|
int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user