diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2023-01-03 15:05:51 +1030 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2023-01-03 15:27:03 +1030 |
commit | 5e0e40e3c53d253bb767606f847182f95a443547 (patch) | |
tree | 4bb35e92e817feadc44b98874b0bb0cf5b68e074 /src/cairoint.h | |
parent | 1af1e11254c29f6bd1f61b9e1776a57d4a772919 (diff) | |
download | cairo-5e0e40e3c53d253bb767606f847182f95a443547.tar.gz |
Fix mingw build failure when SVG fonts enabled
Add missing strndup() function. Copied the strndup() implementation
from util/cairo-missing/strndup.c plus a bug fix.
Diffstat (limited to 'src/cairoint.h')
-rw-r--r-- | src/cairoint.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cairoint.h b/src/cairoint.h index af0f0fadc..976162e6f 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -943,6 +943,13 @@ _cairo_get_locale_decimal_point (void); cairo_private double _cairo_strtod (const char *nptr, char **endptr); +#ifdef HAVE_STRNDUP +#define _cairo_strndup strndup +#else +cairo_private char * +_cairo_strndup (const char *s, size_t n); +#endif + /* cairo-path-fixed.c */ cairo_private cairo_path_fixed_t * _cairo_path_fixed_create (void); |