From f7f8c9af5773c3c73a635308054872b49c5bbe94 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 30 Aug 2022 08:21:01 -0700 Subject: include config.h before system headers Makes sure any defines needed to expose functions like reallocarray() are present on platforms that need them (_GNU_SOURCE, _OPENBSD_SOURCE, __EXTENSIONS__, etc.) Signed-off-by: Alan Coopersmith --- src/encparse.c | 4 ++++ src/fontenc.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/encparse.c b/src/encparse.c index b50b193..7c29628 100644 --- a/src/encparse.c +++ b/src/encparse.c @@ -27,6 +27,10 @@ THE SOFTWARE. hand, we do use strcasecmp, but only on strings that we've checked to be pure ASCII. Bloody ``Code Set Independence''. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/src/fontenc.c b/src/fontenc.c index f5675d8..d0a43e8 100644 --- a/src/fontenc.c +++ b/src/fontenc.c @@ -22,6 +22,10 @@ THE SOFTWARE. /* Backend-independent encoding code */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include -- cgit v1.2.3