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
|
bool
|
||||||
virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps,
|
virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps,
|
||||||
time_t ctime)
|
time_t qemuctime)
|
||||||
{
|
{
|
||||||
if (!qemuCaps->binary)
|
if (!qemuCaps->binary)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!ctime) {
|
if (!qemuctime) {
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
|
||||||
if (stat(qemuCaps->binary, &sb) < 0) {
|
if (stat(qemuCaps->binary, &sb) < 0) {
|
||||||
@ -4097,14 +4097,14 @@ virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps,
|
|||||||
virStrerror(errno, ebuf, sizeof(ebuf)));
|
virStrerror(errno, ebuf, sizeof(ebuf)));
|
||||||
return false;
|
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 "
|
VIR_DEBUG("Outdated capabilities for '%s': QEMU binary changed "
|
||||||
"(%lld vs %lld)",
|
"(%lld vs %lld)",
|
||||||
qemuCaps->binary,
|
qemuCaps->binary,
|
||||||
(long long) ctime, (long long) qemuCaps->ctime);
|
(long long) qemuctime, (long long) qemuCaps->ctime);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user