提交 2d649f80 编写于 作者: J Jiri Denemark

qemu: Fix build on RHEL-6

Commit c29e6d48 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: NJiri Denemark <jdenemar@redhat.com>
上级 ea9d622c
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册