When test-locking is enabled, CFLAGS have -Dbool=char, which makes
pipefd[bool] fail (obviously). Forcing the subscript to be bool by
double negation fixes the build breaker.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Notes:
I still can't build with '--enable-test-locking' and I'm not sure
this
is the proper way to fix it. Also, the code wasn't touched for
months, so I'm not pushing it as a build-breaker.
src/util/virfile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virfile.c b/src/util/virfile.c
index 631cd06..88674ec 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -262,7 +262,7 @@ virFileWrapperFdNew(int *fd, const char *name, unsigned int flags)
}
VIR_FORCE_CLOSE(*fd);
- *fd = pipefd[output];
+ *fd = pipefd[!!output];
return ret;
error:
--
1.8.5.1