mirror of https://gitee.com/openkylin/libvirt.git
qemu: fix build with musl libc
On musl libc "stderr" is a preprocessor macro whose expansion leads to compilation errors: In file included from qemu/qemu_process.c:66: qemu/qemu_process.c: In function 'qemuProcessQMPFree': qemu/qemu_process.c:8418:21: error: expected identifier before '(' token VIR_FREE((proc->stderr)); ^~~~~~ Prevent this by renaming the homonymous field in the _qemuProcessQMP struct to "stdErr". Signed-off-by: Carlos Santos <casantos@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
be2d71f325
commit
44d63ad997
|
@ -8445,7 +8445,7 @@ qemuProcessQMPFree(qemuProcessQMPPtr proc)
|
|||
VIR_FREE(proc->monpath);
|
||||
VIR_FREE(proc->monarg);
|
||||
VIR_FREE(proc->pidfile);
|
||||
VIR_FREE(proc->stderr);
|
||||
VIR_FREE(proc->stdErr);
|
||||
VIR_FREE(proc);
|
||||
}
|
||||
|
||||
|
@ -8598,7 +8598,7 @@ qemuProcessQMPLaunch(qemuProcessQMPPtr proc)
|
|||
virCommandSetGID(proc->cmd, proc->runGid);
|
||||
virCommandSetUID(proc->cmd, proc->runUid);
|
||||
|
||||
virCommandSetErrorBuffer(proc->cmd, &(proc->stderr));
|
||||
virCommandSetErrorBuffer(proc->cmd, &(proc->stdErr));
|
||||
|
||||
if (virCommandRun(proc->cmd, &status) < 0)
|
||||
goto cleanup;
|
||||
|
@ -8608,7 +8608,7 @@ qemuProcessQMPLaunch(qemuProcessQMPPtr proc)
|
|||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Failed to start QEMU binary %s for probing: %s"),
|
||||
proc->binary,
|
||||
proc->stderr ? proc->stderr : _("unknown error"));
|
||||
proc->stdErr ? proc->stdErr : _("unknown error"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
@ -8687,7 +8687,7 @@ qemuProcessQMPConnectMonitor(qemuProcessQMPPtr proc)
|
|||
* ** Send QMP Queries to QEMU using monitor (proc->mon) **
|
||||
* qemuProcessQMPFree(proc);
|
||||
*
|
||||
* Process error output (proc->stderr) remains available in qemuProcessQMP
|
||||
* Process error output (proc->stdErr) remains available in qemuProcessQMP
|
||||
* struct until qemuProcessQMPFree is called.
|
||||
*/
|
||||
int
|
||||
|
|
|
@ -212,7 +212,7 @@ struct _qemuProcessQMP {
|
|||
char *libDir;
|
||||
uid_t runUid;
|
||||
gid_t runGid;
|
||||
char *stderr;
|
||||
char *stdErr;
|
||||
char *monarg;
|
||||
char *monpath;
|
||||
char *pidfile;
|
||||
|
|
Loading…
Reference in New Issue