Skip to content
Snippets Groups Projects
Commit 2afe251d authored by Martin Storsjö's avatar Martin Storsjö Committed by Steve Lhomme
Browse files

contrib: gettext: Backport a gnulib patch to fix building on Clang 16

Clang 16 made implicit function pointer conversions in C an error
(which previously was only a warning).

This backports the following change from upstream gnulib
to the version of the files bundled in gettext:
https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/obstack.c?id=0cc39712803ade7b2d4b89c36b143dad72404063

This fixes errors like these:

    obstack.c:351:31: error: incompatible function pointer types initializing 'void (*)(void) __attribute__((noreturn))' with an expression of type 'void (void)' [-Wincompatible-function-pointer-types]
    __attribute_noreturn__ void (*obstack_alloc_failed_handler) (void)
                                  ^
parent 5b4a021a
No related branches found
No related tags found
1 merge request!2399contrib: gettext: Backport a gnulib patch to fix building on Clang 16
Pipeline #253595 passed with stage
in 1 hour, 35 minutes, and 42 seconds
--- gettext/gettext-tools/libgettextpo/obstack.c.orig 2022-08-12 11:05:36.109187107 +0300
+++ gettext/gettext-tools/libgettextpo/obstack.c 2022-08-12 11:05:47.220954747 +0300
@@ -326,7 +326,7 @@
# include <libio/iolibio.h>
# endif
-static _Noreturn void
+static __attribute_noreturn__ void
print_and_abort (void)
{
/* Don't change any of these strings. Yes, it would be possible to add
--- gettext/gettext-tools/gnulib-lib/obstack.c.orig 2022-08-12 11:04:11.938947065 +0300
+++ gettext/gettext-tools/gnulib-lib/obstack.c 2022-08-12 11:04:19.682785156 +0300
@@ -326,7 +326,7 @@
# include <libio/iolibio.h>
# endif
-static _Noreturn void
+static __attribute_noreturn__ void
print_and_abort (void)
{
/* Don't change any of these strings. Yes, it would be possible to add
......@@ -18,6 +18,7 @@ $(TARBALLS)/gettext-$(GETTEXT_VERSION).tar.gz:
gettext: gettext-$(GETTEXT_VERSION).tar.gz .sum-gettext
$(UNPACK)
$(APPLY) $(SRC)/gettext/gettext-0.21-disable-libtextstyle.patch
$(APPLY) $(SRC)/gettext/obstack-func-ptr.patch
$(MOVE)
DEPS_gettext = iconv $(DEPS_iconv) libxml2 $(DEPS_libxml2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment