From: Nick Bowler Date: Tue, 13 Jun 2023 01:01:27 +0000 (-0400) Subject: tap: Include as needed. X-Git-Url: https://git.draconx.ca/gitweb/dxcommon.git/commitdiff_plain/a686e811e9fb465ed7c8d88f75915489fc7d09f0 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. --- 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