aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@fh-muenster.de>2023-08-01 00:17:18 +0200
committerMichael Tuexen <tuexen@fh-muenster.de>2023-08-01 00:17:18 +0200
commit622139e4fc5f0480a6ab9c66b02789f8669eeb46 (patch)
tree292117c5f989c4d2be3917a41da8f22b04e5b9bf
parent8ea35f0bb61292e108aac4816b49b6afc3538cd2 (diff)
downloadusrsctp-622139e4fc5f0480a6ab9c66b02789f8669eeb46.tar.gz
Try to fix compilation issues.
-rwxr-xr-xusrsctplib/netinet/sctp_os_userspace.h6
-rwxr-xr-xusrsctplib/netinet/sctputil.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/usrsctplib/netinet/sctp_os_userspace.h b/usrsctplib/netinet/sctp_os_userspace.h
index 0434cf0e..493ae026 100755
--- a/usrsctplib/netinet/sctp_os_userspace.h
+++ b/usrsctplib/netinet/sctp_os_userspace.h
@@ -964,9 +964,9 @@ int sctp_userspace_get_mtu_from_ifn(uint32_t if_index);
{ \
atomic_add_int(&(sb)->sb_cc, incr); \
}
-#define SCTP_SB_DECR(sb, decr) \
-{ \
- SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_cc, decr); \
+#define SCTP_SB_DECR(sb, decr) \
+{ \
+ SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_cc, (int)(decr)); \
}
/* clear the socket buffer state */
#define SCTP_SB_CLEAR(sb) \
diff --git a/usrsctplib/netinet/sctputil.c b/usrsctplib/netinet/sctputil.c
index c064c52e..7d276e3b 100755
--- a/usrsctplib/netinet/sctputil.c
+++ b/usrsctplib/netinet/sctputil.c
@@ -6754,7 +6754,7 @@ sctp_sorecvmsg(struct socket *so,
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) {
sctp_sblog(&so->so_rcv, control->do_not_ref_stcb?NULL:stcb, SCTP_LOG_SBFREE, (int)cp_len);
}
- SCTP_SB_DECR(&so->so_rcv, (int)cp_len);
+ SCTP_SB_DECR(&so->so_rcv, cp_len);
if ((control->do_not_ref_stcb == 0) &&
stcb) {
atomic_subtract_int(&stcb->asoc.sb_cc, (int)cp_len);