提交 44d63ad9 编写于 作者: C Carlos Santos 提交者: Michal Privoznik

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: NCarlos Santos <casantos@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 be2d71f3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册