diff --git a/src/hb.hh b/src/hb.hh index f31651217..f6398ccef 100644 --- a/src/hb.hh +++ b/src/hb.hh @@ -370,10 +370,12 @@ extern "C" void hb_free_impl(void *ptr); #define getenv(Name) nullptr #endif -#ifdef HB_NO_ERRNO -static int errno = 0; /* Use something better? */ +#ifndef HB_NO_ERRNO +# include #else -#include +static int _hb_errno = 0; /* Use something better? */ +# undef errno +# define errno _hb_errno #endif #if defined(HAVE_ATEXIT) && !defined(HB_USE_ATEXIT)