[PATCH] Fix syntax-check 'always true header test' for virvsock.c

Daniel Henrique Barboza danielhb413 at gmail.com
Mon Jan 20 18:32:13 UTC 2020


Commit 05a38d4c4a ("src: conditionalize / remove use of
sys/ioctl.h") aimed to remove imports of ioctl.h and
conditionalize them for compilation on Windows. However, the
change made in virvsock.c:

-#include <sys/ioctl.h>
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif

Makes the 'sc_prohibit_always_true_header_tests' rule complain about
the redundancy of this test when building it on Linux.

../src/util/virvsock.c:20:#ifdef HAVE_SYS_IOCTL_H
build-aux/syntax-check.mk: do not test the above HAVE_<header>_H symbol(s);
  with the corresponding gnulib module, they are always true
make: *** [../build-aux/syntax-check.mk:1679: sc_prohibit_always_true_header_tests] Error 1
make: *** Waiting for unfinished jobs....

This patch fixes it by changing the conditional to #ifndef WIN32
instead, like the other changes made by that patch.

CC: Daniel P. Berrangé <berrange at redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
---
 src/util/virvsock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virvsock.c b/src/util/virvsock.c
index 2638c5095a..1e2eb553d2 100644
--- a/src/util/virvsock.c
+++ b/src/util/virvsock.c
@@ -17,7 +17,7 @@
 
 #include <config.h>
 
-#ifdef HAVE_SYS_IOCTL_H
+#ifndef WIN32
 # include <sys/ioctl.h>
 #endif
 
-- 
2.24.1





More information about the libvir-list mailing list