Skip to content

Commit

Permalink
Add patch to define alloca with MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
danyeaw committed Oct 24, 2023
1 parent 4c296e6 commit 2eaef2c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions gvsbuild/patches/cairo/0001-fix-alloca-unresolved.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Subject: [PATCH] Fix alloca unresolved
---
Index: src/cairo-colr-glyph-render.c
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/cairo-colr-glyph-render.c b/src/cairo-colr-glyph-render.c
--- a/src/cairo-colr-glyph-render.c (revision 459d19ef1520d39078038ecaa840efca0194e053)
+++ b/src/cairo-colr-glyph-render.c (date 1696094155649)
@@ -43,6 +43,10 @@
#include <stdio.h>
#include <string.h>

+#ifdef _MSC_VER
+#include <malloc.h>
+#endif
+
#if HAVE_FT_COLR_V1

#include <ft2build.h>
1 change: 1 addition & 0 deletions gvsbuild/projects/cairo.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(self):
archive_url="https://gitlab.freedesktop.org/cairo/cairo/-/archive/{version}/cairo-{version}.tar.gz",
hash="39a78afdc33a435c0f2ab53a5ec2a693c3c9b6d2ec9783ceecb2b94d54d942b0",
dependencies=["fontconfig", "freetype", "glib", "pixman", "libpng"],
patches=["0001-fix-alloca-unresolved.patch"],
)

def build(self):
Expand Down

0 comments on commit 2eaef2c

Please sign in to comment.