From aff1b479c7b168652bd20305ceed4317d5db6661 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Tue, 12 Sep 2023 20:55:10 +0300 Subject: lib/getopt*.c: Include only HAVE_CONFIG_H is defined. The CMake-based build doesn't use config.h. Up-to-date getopt_long in Gnulib is LGPLv2 so at some point it could be included in XZ Utils too but for now this commit is enough to make CMake-based build possible. --- lib/getopt1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/getopt1.c') diff --git a/lib/getopt1.c b/lib/getopt1.c index da5d5330..ebc46404 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -20,7 +20,9 @@ #ifdef _LIBC # include #else -# include +# ifdef HAVE_CONFIG_H +# include +# endif # include "getopt.h" #endif #include "getopt_int.h" -- cgit v1.2.3