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/getopt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/getopt.c') diff --git a/lib/getopt.c b/lib/getopt.c index f8fc003d..36c28318 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -21,7 +21,9 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBC -# include +# ifdef HAVE_CONFIG_H +# include +# endif #endif #include "getopt.h" -- cgit v1.2.3