]> git.proxmox.com Git - mirror_qemu.git/commit - tci.c
tci: Fix build regression
authorStefan Weil <sw@weilnetz.de>
Tue, 5 Apr 2016 20:24:51 +0000 (22:24 +0200)
committerStefan Weil <sw@weilnetz.de>
Thu, 7 Apr 2016 17:01:21 +0000 (19:01 +0200)
commit3ccdbecf80a322a31dbf452d433321c67f82d534
treea838c9f7275d3fdc83ccee361ffb82930e5de3f6
parente380023898479b57d38c0569c02f7bd41090181b
tci: Fix build regression

Commit d38ea87ac54af64ef611de434d07c12dc0399216 cleaned the include
statements which resulted in a wrong order of assert.h and the definition
of NDEBUG in tci.c. Normally NDEBUG modifies the definition of the assert
macro, but here this definition comes too late which results in a failing
build.

To fix this, a new macro tci_assert which depends on CONFIG_DEBUG_TCG
is introduced. Only builds with CONFIG_DEBUG_TCG will use assertions.
Even in this case, it is still possible to disable assertions by
defining NDEBUG via compiler settings.

Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
tci.c