summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--fonttosfnt.h4
-rw-r--r--util.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 73f646c..ac6c645 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,7 @@ AC_PROG_CC
AC_PROG_INSTALL
AC_CHECK_FUNC(setenv, have_setenv=yes, have_setenv=no)
+AC_CHECK_FUNCS([vasprintf])
AM_CONDITIONAL(NEED_SETENV, [test x$have_setenv = xno])
diff --git a/fonttosfnt.h b/fonttosfnt.h
index 5b3ec78..d6aa004 100644
--- a/fonttosfnt.h
+++ b/fonttosfnt.h
@@ -24,6 +24,10 @@ THE SOFTWARE.
#ifndef _FONTTOSFNT_H_
#define _FONTTOSFNT_H_ 1
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdarg.h>
#include <ft2build.h>
#include FT_FREETYPE_H
diff --git a/util.c b/util.c
index 1fbbbd4..e4ca332 100644
--- a/util.c
+++ b/util.c
@@ -79,7 +79,7 @@ sprintf_alloc(char *f, ...)
return s;
}
-#ifdef __GLIBC__
+#if HAVE_VASPRINTF
char*
vsprintf_alloc(char *f, va_list args)
{