[openwrt-24.10] libiconv: fix compilation on hosts GCC=15

Robert Marko robimarko at gmail.com
Fri May 30 04:11:53 PDT 2025


On Wed, 28 May 2025 at 15:30, Tomasz Maciej Nowak <tmn505 at terefe.re> wrote:
>
> From: Tomasz Maciej Nowak <tmn505 at gmail.com>
>
> Backport upstream commit dropping external definition of mbrtowc. The
> said definition conflicts with one provided by GCC 15. Issue found on
> 24.10 SDK.
>
> Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>

Merged, thank you.

https://github.com/openwrt/openwrt/commit/2f289e3b7452ac877632d9f3b2237f8276076a79

Regards,
Robert
> ---
>  package/libs/libiconv-full/Makefile           |  2 +-
>  ...ing-a-function-declaration-without-a.patch | 33 +++++++++++++++++++
>  2 files changed, 34 insertions(+), 1 deletion(-)
>  create mode 100644 package/libs/libiconv-full/patches/001-Fix-a-clang-warning-a-function-declaration-without-a.patch
>
> diff --git a/package/libs/libiconv-full/Makefile b/package/libs/libiconv-full/Makefile
> index 0c793973a05f..883794258590 100644
> --- a/package/libs/libiconv-full/Makefile
> +++ b/package/libs/libiconv-full/Makefile
> @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
>
>  PKG_NAME:=libiconv-full
>  PKG_VERSION:=1.17
> -PKG_RELEASE:=1
> +PKG_RELEASE:=2
>
>  PKG_SOURCE:=libiconv-$(PKG_VERSION).tar.gz
>  PKG_SOURCE_URL:=@GNU/libiconv
> diff --git a/package/libs/libiconv-full/patches/001-Fix-a-clang-warning-a-function-declaration-without-a.patch b/package/libs/libiconv-full/patches/001-Fix-a-clang-warning-a-function-declaration-without-a.patch
> new file mode 100644
> index 000000000000..86cd2bc973c5
> --- /dev/null
> +++ b/package/libs/libiconv-full/patches/001-Fix-a-clang-warning-a-function-declaration-without-a.patch
> @@ -0,0 +1,33 @@
> +From e46dee2f581c1167137bcd045e114e96a9f00483 Mon Sep 17 00:00:00 2001
> +From: Bruno Haible <bruno at clisp.org>
> +Date: Sun, 29 Jan 2023 20:07:21 +0100
> +Subject: [PATCH] Fix a clang warning "a function declaration without a
> + prototype...".
> +
> +* lib/loop_wchar.h (mbrtowc): Don't declare. Drop portability to BeOS.
> +---
> + lib/loop_wchar.h | 3 +--
> + 1 file changed, 1 insertions(+), 2 deletions(-)
> +
> +diff --git a/lib/loop_wchar.h b/lib/loop_wchar.h
> +index b3edc2925c60..9eb508e81a4f 100644
> +--- a/lib/loop_wchar.h
> ++++ b/lib/loop_wchar.h
> +@@ -1,5 +1,5 @@
> + /*
> +- * Copyright (C) 2000-2002, 2005-2006, 2008-2009, 2011 Free Software Foundation, Inc.
> ++ * Copyright (C) 2000-2002, 2005-2006, 2008-2009, 2011, 2023 Free Software Foundation, Inc.
> +  * This file is part of the GNU LIBICONV Library.
> +  *
> +  * The GNU LIBICONV Library is free software; you can redistribute it
> +@@ -36,7 +36,6 @@
> + # include <wchar.h>
> + # define BUF_SIZE 64  /* assume MB_LEN_MAX <= 64 */
> +   /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t.  */
> +-  extern size_t mbrtowc ();
> + # ifdef mbstate_t
> + #  define mbrtowc(pwc, s, n, ps) (mbrtowc)(pwc, s, n, 0)
> + #  define mbsinit(ps) 1
> +--
> +2.49.0
> +
> --
> 2.49.0
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list