From d1604a37295644f1393e46bba0bb20471128bb33 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Sat, 1 May 2021 18:07:47 +0200 Subject: 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 --- external/zxing/UnpackedTarball_zxing.mk | 3 ++- external/zxing/zxing_newline.patch.1 | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 external/zxing/zxing_newline.patch.1 (limited to 'external') 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 + + /* 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]; -- cgit