mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
qemu: Fix build on RHEL-6
Commit c29e6d4805
cause build failure on RHEL-6:
../../src/qemu/qemu_capabilities.c: In function 'virQEMUCapsIsValid':
../../src/qemu/qemu_capabilities.c:4085: error: declaration of 'ctime'
shadows a global declaration [-Wshadow]
/usr/include/time.h:258: error: shadowed declaration is here [-Wshadow]
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
ea9d622c0c
commit
2d649f800f
@ -4082,12 +4082,12 @@ virQEMUCapsNewForBinary(virCapsPtr caps,
|
||||
|
||||
bool
|
||||
virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps,
|
||||
time_t ctime)
|
||||
time_t qemuctime)
|
||||
{
|
||||
if (!qemuCaps->binary)
|
||||
return true;
|
||||
|
||||
if (!ctime) {
|
||||
if (!qemuctime) {
|
||||
struct stat sb;
|
||||
|
||||
if (stat(qemuCaps->binary, &sb) < 0) {
|
||||
@ -4097,14 +4097,14 @@ virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps,
|
||||
virStrerror(errno, ebuf, sizeof(ebuf)));
|
||||
return false;
|
||||
}
|
||||
ctime = sb.st_ctime;
|
||||
qemuctime = sb.st_ctime;
|
||||
}
|
||||
|
||||
if (ctime != qemuCaps->ctime) {
|
||||
if (qemuctime != qemuCaps->ctime) {
|
||||
VIR_DEBUG("Outdated capabilities for '%s': QEMU binary changed "
|
||||
"(%lld vs %lld)",
|
||||
qemuCaps->binary,
|
||||
(long long) ctime, (long long) qemuCaps->ctime);
|
||||
(long long) qemuctime, (long long) qemuCaps->ctime);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user