From c09dca3fb0369a92a7cfb2a5ec3102a6315b8cc2 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 19 Feb 2023 20:23:36 +0800 Subject: [PATCH] Fix sfntfont.c build without mmap * src/sfntfont.c (sfntfont_close): Don't unlink font if mmap is not available. --- src/sfntfont.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sfntfont.c b/src/sfntfont.c index bb816fabd3e..b9141b05aad 100644 --- a/src/sfntfont.c +++ b/src/sfntfont.c @@ -2565,6 +2565,8 @@ sfntfont_close (struct font *font) xfree (info->cvt); xfree (info->interpreter); +#ifdef HAVE_MMAP + /* Unlink INFO. */ next = &open_fonts; @@ -2575,6 +2577,8 @@ sfntfont_close (struct font *font) *next = info->next; info->next = NULL; +#endif /* HAVE_MMAP */ + sfntfont_free_outline_cache (&info->outline_cache); sfntfont_free_raster_cache (&info->raster_cache); } -- 2.39.5