mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
freediameter: fix build with gcc-15.0.1
* backport fix from:
https://github.com/freeDiameter/freeDiameter/issues/72
a54f10082f
to fix:
http://errors.yoctoproject.org/Errors/Details/850312/
TOPDIR/tmp/work/qemux86_64-oe-linux/freediameter/1.5.0+git/git/libfdcore/sctp.c:622:21: note: 'bool' is a keyword with '-std=c23' onwards
TOPDIR/tmp/work/qemux86_64-oe-linux/freediameter/1.5.0+git/git/libfdcore/sctp.c:622:26: error: expected identifier or '(' before '=' token
622 | int bool = 1;
| ^
Signed-off-by: mark.yang <mark.yang@lge.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
41723a2a7d
commit
f452fa2fce
@ -0,0 +1,69 @@
|
||||
From a54f10082f819dadfa6931166e71edffadb565dd Mon Sep 17 00:00:00 2001
|
||||
From: Victor Seva <vseva@debian.org>
|
||||
Date: Sun, 23 Feb 2025 13:38:48 +0100
|
||||
Subject: [PATCH] fixes for gcc-15
|
||||
|
||||
fixes #72
|
||||
|
||||
Upstream-Status: Backport [https://github.com/freeDiameter/freeDiameter/commit/a54f10082f819dadfa6931166e71edffadb565dd]
|
||||
Signed-off-by: mark.yang <mark.yang@lge.com>
|
||||
---
|
||||
libfdcore/sctp.c | 22 +++++++++++-----------
|
||||
1 file changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/libfdcore/sctp.c b/libfdcore/sctp.c
|
||||
index 95e822e..a4a7f40 100644
|
||||
--- a/libfdcore/sctp.c
|
||||
+++ b/libfdcore/sctp.c
|
||||
@@ -532,29 +532,29 @@ static int fd_setsockopt_prebind(int sk)
|
||||
/* SCTP_EXPLICIT_EOR: we assume implicit EOR in freeDiameter, so let's ensure this is known by the stack */
|
||||
#ifdef SCTP_EXPLICIT_EOR
|
||||
{
|
||||
- int bool;
|
||||
+ int _bool;
|
||||
|
||||
if (TRACE_BOOL(ANNOYING)) {
|
||||
sz = sizeof(bool);
|
||||
/* Read socket defaults */
|
||||
- CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, &sz) );
|
||||
- if (sz != sizeof(bool))
|
||||
+ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &_bool, &sz) );
|
||||
+ if (sz != sizeof(_bool))
|
||||
{
|
||||
- TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(bool));
|
||||
+ TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(_bool));
|
||||
return ENOTSUP;
|
||||
}
|
||||
- fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false");
|
||||
+ fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s", _bool ? "true" : "false");
|
||||
}
|
||||
|
||||
- bool = 0;
|
||||
+ _bool = 0;
|
||||
|
||||
/* Set the option to the socket */
|
||||
- CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, sizeof(bool)) );
|
||||
+ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &_bool, sizeof(_bool)) );
|
||||
|
||||
if (TRACE_BOOL(ANNOYING)) {
|
||||
/* Check new values */
|
||||
- CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, &sz) );
|
||||
- fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false");
|
||||
+ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &_bool, &sz) );
|
||||
+ fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s", _bool ? "true" : "false");
|
||||
}
|
||||
}
|
||||
#else /* SCTP_EXPLICIT_EOR */
|
||||
@@ -619,10 +619,10 @@ static int fd_setsockopt_prebind(int sk)
|
||||
|
||||
#ifdef SCTP_RECVRCVINFO /* Replaces SCTP_SNDRCV */
|
||||
{
|
||||
- int bool = 1;
|
||||
+ int _bool = 1;
|
||||
|
||||
/* Set the option to the socket */
|
||||
- CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_RECVRCVINFO, &bool, sizeof(bool)) );
|
||||
+ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_RECVRCVINFO, &_bool, sizeof(_bool)) );
|
||||
|
||||
}
|
||||
#else /* SCTP_RECVRCVINFO */
|
||||
@ -24,6 +24,7 @@ SRC_URI = "git://github.com/freeDiameter/freeDiameter;protocol=https;branch=mast
|
||||
file://install_test.patch \
|
||||
file://0001-tests-use-EXTENSIONS_DIR.patch \
|
||||
file://0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch \
|
||||
file://0001-fixes-for-gcc-15.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user