mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-30 13:00:02 +00:00
libconfig: fix build with gcc-15
* backport fix from: https://github.com/hyperrealm/libconfig/commit/690342b9cbc8b39787a1501bd890d63ca63a003c to fix: http://errors.yoctoproject.org/Errors/Details/848457/ grammar.y:58:33: error: too many arguments to function 'libconfig_yyget_lineno'; expected 0, have 1 * need to add bison-native dependency while grammar.y is modified with the above patch to fix: http://errors.yoctoproject.org/Errors/Details/848472/ ../aux-build/ylwrap: line 174: yacc: command not found Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+38
@@ -0,0 +1,38 @@
|
|||||||
|
From 0511e285f3c886a388b8e9c6a4829752d60ab44c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rudi Heitbaum <rudi@heitbaum.com>
|
||||||
|
Date: Thu, 5 Dec 2024 06:47:40 +0000
|
||||||
|
Subject: [PATCH] Fix declarations to allow build with gcc 15
|
||||||
|
|
||||||
|
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
|
||||||
|
|
||||||
|
Upstream-Status: Backport [690342b Fix declarations to allow build with gcc 15]
|
||||||
|
---
|
||||||
|
lib/grammar.y | 8 ++++++--
|
||||||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/grammar.y b/lib/grammar.y
|
||||||
|
index 87dac00..0e9d0bb 100644
|
||||||
|
--- a/lib/grammar.y
|
||||||
|
+++ b/lib/grammar.y
|
||||||
|
@@ -40,8 +40,7 @@
|
||||||
|
#include "wincompat.h"
|
||||||
|
|
||||||
|
/* These declarations are provided to suppress compiler warnings. */
|
||||||
|
-extern int libconfig_yylex();
|
||||||
|
-extern int libconfig_yyget_lineno();
|
||||||
|
+extern int libconfig_yyget_lineno(void *);
|
||||||
|
|
||||||
|
static const char *err_array_elem_type = "mismatched element type in array";
|
||||||
|
static const char *err_duplicate_setting = "duplicate setting name";
|
||||||
|
@@ -80,6 +79,11 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx,
|
||||||
|
char *sval;
|
||||||
|
}
|
||||||
|
|
||||||
|
+%{
|
||||||
|
+/* These declarations are provided to suppress compiler warnings. */
|
||||||
|
+extern int libconfig_yylex(YYSTYPE *, void *);
|
||||||
|
+%}
|
||||||
|
+
|
||||||
|
%token <ival> TOK_BOOLEAN TOK_INTEGER TOK_HEX
|
||||||
|
%token <llval> TOK_INTEGER64 TOK_HEX64
|
||||||
|
%token <fval> TOK_FLOAT
|
||||||
@@ -7,7 +7,12 @@ SECTION = "libs"
|
|||||||
LICENSE = "LGPL-2.1-only"
|
LICENSE = "LGPL-2.1-only"
|
||||||
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=fad9b3332be894bab9bc501572864b29"
|
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=fad9b3332be894bab9bc501572864b29"
|
||||||
|
|
||||||
SRC_URI = "https://hyperrealm.github.io/libconfig/dist/libconfig-${PV}.tar.gz"
|
SRC_URI = "https://hyperrealm.github.io/libconfig/dist/libconfig-${PV}.tar.gz \
|
||||||
|
file://0001-Fix-declarations-to-allow-build-with-gcc-15.patch \
|
||||||
|
"
|
||||||
|
|
||||||
|
# needed when we modify grammar.y with above patch
|
||||||
|
DEPENDS += "bison-native"
|
||||||
|
|
||||||
UPSTREAM_CHECK_URI = "https://github.com/hyperrealm/libconfig/releases"
|
UPSTREAM_CHECK_URI = "https://github.com/hyperrealm/libconfig/releases"
|
||||||
UPSTREAM_CHECK_REGEX = "Version (?P<pver>\d+(\.\d+)+)"
|
UPSTREAM_CHECK_REGEX = "Version (?P<pver>\d+(\.\d+)+)"
|
||||||
|
|||||||
Reference in New Issue
Block a user