1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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 */
|