Merge pull request #10083 from heitbaum/hostgcc

Fix some gcc identified host compile issues
This commit is contained in:
Christian Hewitt 2025-05-23 13:53:18 +04:00 committed by GitHub
commit 72afde8938
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 71 additions and 5 deletions

View File

@ -18,6 +18,14 @@ PKG_CONFIGURE_OPTS_HOST="--enable-static --disable-shared --disable-rpath --with
PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_realloc_0_nonnull=yes \
ac_cv_func_malloc_0_nonnull=yes"
pre_configure_target() {
export CC_FOR_BUILD="${CC}";
export CFLAGS_FOR_BUILD="${CFLAGS}";
export CPP_FOR_BUILD="${CPP}";
export CPPFLAGS_FOR_BUILD="${CPPFLAGS}";
export LDFLAGS_FOR_BUILD="${LDFLAGS}";
}
post_makeinstall_host() {
cat >${TOOLCHAIN}/bin/lex <<"EOF"
#!/bin/sh

View File

@ -0,0 +1,22 @@
From 4b142954b54a57a9b0af0a9661056a9c39a8fa95 Mon Sep 17 00:00:00 2001
From: Richard Barnes <rbarnes@umn.edu>
Date: Wed, 2 Oct 2024 10:35:09 -0700
Subject: [PATCH] Match `malloc` signature to its use
---
lib/malloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/malloc.c b/lib/malloc.c
index 75e8ef97c..701b9b39d 100755
--- a/lib/malloc.c
+++ b/lib/malloc.c
@@ -3,7 +3,7 @@
#include <sys/types.h>
- void *malloc ();
+ void *malloc (size_t n);
/* Allocate an N-byte block of memory from the heap.
If N is zero, allocate a 1-byte block. */

View File

@ -3,11 +3,11 @@
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="ncurses"
PKG_VERSION="6.5"
PKG_SHA256="136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6"
PKG_VERSION="6.5-20250517"
PKG_SHA256="13e78548b31adef93e3b9735bf728fac5a84969873333c7833614db61891353e"
PKG_LICENSE="MIT"
PKG_SITE="http://www.gnu.org/software/ncurses/"
PKG_URL="http://invisible-mirror.net/archives/ncurses/ncurses-${PKG_VERSION}.tar.gz"
PKG_URL="http://invisible-mirror.net/archives/ncurses/current/ncurses-${PKG_VERSION}.tgz"
PKG_DEPENDS_HOST="ccache:host"
PKG_DEPENDS_TARGET="autotools:host gcc:host zlib ncurses:host"
PKG_LONGDESC="A library is a free software emulation of curses in System V Release 4.0, and more."
@ -70,8 +70,8 @@ PKG_CONFIGURE_OPTS_HOST="--enable-termcap \
pre_configure_target() {
cat >config.cache <<EOF
cf_cv_builtin_bool=1
cf_cv_header_stdbool_h=1
cf_cv_builtin_bool=yes
cf_cv_header_stdbool_h=yes
EOF
}

View File

@ -0,0 +1,36 @@
From b3b26a7e125e5e4f5b69975cc17eb6d33198ebaa Mon Sep 17 00:00:00 2001
From: Emmanuele Bassi <ebassi@gnome.org>
Date: Thu, 11 Apr 2024 14:40:21 +0100
Subject: [PATCH] Do not use bool as a field name
C99 aliases `bool` to `_Bool`, and C23 introduces `bool` as a reserved
keyword. Let's avoid using `bool` as a field name.
Upstream-Status: Backport [Backport from glib to bunlded version in pkg-config https://github.com/GNOME/glib/commit/9e320e1c43a4770ed1532248fe5416eb0c618120]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
glib/glib/goption.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/glib/glib/goption.c b/glib/glib/goption.c
index 0a22f6f..f439fd4 100644
--- a/glib/glib/goption.c
+++ b/glib/glib/goption.c
@@ -166,7 +166,7 @@ typedef struct
gpointer arg_data;
union
{
- gboolean bool;
+ gboolean boolean;
gint integer;
gchar *str;
gchar **array;
@@ -1600,7 +1600,7 @@ free_changes_list (GOptionContext *context,
switch (change->arg_type)
{
case G_OPTION_ARG_NONE:
- *(gboolean *)change->arg_data = change->prev.bool;
+ *(gboolean *)change->arg_data = change->prev.boolean;
break;
case G_OPTION_ARG_INT:
*(gint *)change->arg_data = change->prev.integer;