From a686e811e9fb465ed7c8d88f75915489fc7d09f0 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Mon, 12 Jun 2023 21:01:27 -0400 Subject: [PATCH] tap: Include as needed. When using a config header in Autoconf, it is necessary to #include that header before including anything else that might be influenced by configure tests, which includes standard C headers. In particular, things can go completely off the rails if Gnulib is involved and generates replacements for the standard headers used by this file. --- src/tap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tap.c b/src/tap.c index 4416a9c..4d80c75 100644 --- a/src/tap.c +++ b/src/tap.c @@ -1,5 +1,5 @@ /* - * Copyright © 2015 Nick Bowler + * Copyright © 2015, 2023 Nick Bowler * * Simple TAP output library for C programs. * @@ -8,6 +8,10 @@ * There is NO WARRANTY, to the extent permitted by law. */ +#if HAVE_CONFIG_H +# include +#endif + #include #include #include -- 2.43.2