[vlc-devel] [PATCH 2/3] contribs: harfbuzz: Fix compilation with clang on win64

Martin Storsjö martin at martin.st
Thu Dec 21 22:57:43 CET 2017


Clang errors out on casting from a pointer to a smaller integer
type.

This is an adapted backport of a newer upstream harfbuzz
commit 03b7a221f701a9b003890878e730ad175c3fdd86.
---
 contrib/src/harfbuzz/rules.mak   |  1 +
 contrib/src/harfbuzz/win64.patch | 12 ++++++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 contrib/src/harfbuzz/win64.patch

diff --git a/contrib/src/harfbuzz/rules.mak b/contrib/src/harfbuzz/rules.mak
index b37cdef..ba447b4 100644
--- a/contrib/src/harfbuzz/rules.mak
+++ b/contrib/src/harfbuzz/rules.mak
@@ -24,6 +24,7 @@ harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.bz2 .sum-harfbuzz
 	$(APPLY) $(SRC)/harfbuzz/harfbuzz-aarch64.patch
 	$(APPLY) $(SRC)/harfbuzz/harfbuzz-clang.patch
 	$(APPLY) $(SRC)/harfbuzz/harfbuzz-coretext.patch
+	$(APPLY) $(SRC)/harfbuzz/win64.patch
 	$(MOVE)
 
 DEPS_harfbuzz = freetype2 $(DEPS_freetype2)
diff --git a/contrib/src/harfbuzz/win64.patch b/contrib/src/harfbuzz/win64.patch
new file mode 100644
index 0000000..17c1319
--- /dev/null
+++ b/contrib/src/harfbuzz/win64.patch
@@ -0,0 +1,12 @@
+diff -urN harfbuzz-orig/src/hb-private.hh harfbuzz/src/hb-private.hh
+--- harfbuzz-orig/src/hb-private.hh	2017-01-10 06:18:28.000000000 +0000
++++ harfbuzz/src/hb-private.hh	2017-12-21 21:46:12.254147419 +0000
+@@ -684,7 +684,7 @@
+   fprintf (stderr, "%-10s", what ? what : "");
+ 
+   if (obj)
+-    fprintf (stderr, "(%0*lx) ", (unsigned int) (2 * sizeof (void *)), (unsigned long) obj);
++    fprintf (stderr, "(%0*p) ", (unsigned int) (2 * sizeof (void *)), obj);
+   else
+     fprintf (stderr, " %*s  ", (unsigned int) (2 * sizeof (void *)), "");
+ 
-- 
2.7.4



More information about the vlc-devel mailing list