git: 642ac6015b56 - main - tcp: fix ports
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 30 Dec 2023 14:44:37 UTC
The branch main has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=642ac6015b56ab7c1bcb34f0558567c7f9f9743a
commit 642ac6015b56ab7c1bcb34f0558567c7f9f9743a
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2023-12-30 02:28:13 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2023-12-30 02:28:13 +0000
tcp: fix ports
inline is only support in C99 and newer. To support also C89, use
__inline instead as suggested by dim.
Reported by: eduardo
Reviewed by: rscheff, markj, dim, imp
Tested by: eduardo
Fixes: a8b70cf26030 ("netpfil: Use accessor functions and named constants for all tcphdr flags")
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D43231
---
sys/netinet/tcp.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h
index 209b89c9a427..64286ede9575 100644
--- a/sys/netinet/tcp.h
+++ b/sys/netinet/tcp.h
@@ -79,13 +79,13 @@ struct tcphdr {
u_short th_urp; /* urgent pointer */
};
-static inline uint16_t
+static __inline uint16_t
tcp_get_flags(const struct tcphdr *th)
{
return (((uint16_t)th->th_x2 << 8) | th->th_flags);
}
-static inline void
+static __inline void
tcp_set_flags(struct tcphdr *th, uint16_t flags)
{
th->th_x2 = (flags >> 8) & 0x0f;