On Thu, Jan 09, 2020 at 06:18:33PM +0100, Pino Toscano wrote:
autotools define HAVE_CONFIG_H to signal a config.h was generated;
since
this file is built directly also in bindings without the use of
config.h, make sure config.h is not requested in those cases.
This file uses only POSIX functions anyway, so it should not be a
problem.
---
utils/stringlists-utils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/utils/stringlists-utils.c b/utils/stringlists-utils.c
index 92c8030..97ad360 100644
--- a/utils/stringlists-utils.c
+++ b/utils/stringlists-utils.c
@@ -23,7 +23,9 @@
* such as C<safe_*>, C<error> or C<perrorf>, or any
C<guestfs_int_*>.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <stdlib.h>
#include <string.h>
--
2.24.1
ACK
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW