summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-30 08:21:01 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-30 08:21:01 -0700
commitf7f8c9af5773c3c73a635308054872b49c5bbe94 (patch)
treee17c684ae7f4d8f21228d37205314c61d6f73706
parent26ae989526a2c931d15a4c4ae2e84ab627bc0009 (diff)
downloadxorg-lib-libfontenc-f7f8c9af5773c3c73a635308054872b49c5bbe94.tar.gz
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 <alan.coopersmith@oracle.com>
-rw-r--r--src/encparse.c4
-rw-r--r--src/fontenc.c4
2 files changed, 8 insertions, 0 deletions
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 <config.h>
+#endif
+
#include <string.h>
#include <strings.h>
#include <stdio.h>
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 <config.h>
+#endif
+
#include <string.h>
#include <strings.h>
#include <stdlib.h>