summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-05-01 18:07:47 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-05-01 20:42:22 +0200
commitd1604a37295644f1393e46bba0bb20471128bb33 (patch)
tree5acdc0544205ca0047a37fd88c74b2a980cce3ad /external
parentce7729ab473b971164822338661d1a4828d860d2 (diff)
zxing: newline problem with GCC 11 -E -fdirectives-only
KRHangulMapping.h:38:55: error: stray '#' in program Change-Id: I81e15f524c68da6bd5271a89035857f5e3c2ebc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114974 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'external')
-rw-r--r--external/zxing/UnpackedTarball_zxing.mk3
-rw-r--r--external/zxing/zxing_newline.patch.119
2 files changed, 21 insertions, 1 deletions
diff --git a/external/zxing/UnpackedTarball_zxing.mk b/external/zxing/UnpackedTarball_zxing.mk
index 335440e2f529..faefd5faf621 100644
--- a/external/zxing/UnpackedTarball_zxing.mk
+++ b/external/zxing/UnpackedTarball_zxing.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,zxing,$(ZXING_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,zxing,1))
$(eval $(call gb_UnpackedTarball_add_patches,zxing, \
+ external/zxing/zxing_newline.patch.1 \
))
-# vim: set noet sw=4 ts=4: \ No newline at end of file
+# vim: set noet sw=4 ts=4:
diff --git a/external/zxing/zxing_newline.patch.1 b/external/zxing/zxing_newline.patch.1
new file mode 100644
index 000000000000..5b51ba7a2027
--- /dev/null
+++ b/external/zxing/zxing_newline.patch.1
@@ -0,0 +1,19 @@
+Add newline at end of KRHangulMapping.h
+
+without this, GCC 11 -E -fdirectives-only produces this:
+
+extern const uint16_t ksc5601_hangul_to_unicode[2350];# 38 "/workdir/UnpackedTarball/zxing/core/src/textcodec/KRHangulMapping.cpp" 2
+
+and compiling that fails with:
+
+KRHangulMapping.h:38:55: error: stray '#' in program
+
+--- zxing/core/src/textcodec/KRHangulMapping.h.orig 2021-05-01 18:00:09.011795242 +0200
++++ zxing/core/src/textcodec/KRHangulMapping.h 2021-05-01 18:00:16.774788294 +0200
+@@ -35,4 +35,4 @@
+ #include <cstdint>
+
+ /* Table including ksc5601 hangul to unicode */
+-extern const uint16_t ksc5601_hangul_to_unicode[2350];
+\ No newline at end of file
++extern const uint16_t ksc5601_hangul_to_unicode[2350];