aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2023-12-30 02:28:13 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2023-12-30 02:28:13 +0000
commit642ac6015b56ab7c1bcb34f0558567c7f9f9743a (patch)
treee1ead24537bd055ca6f0890687378f3a2a6d9bb5
parent1b8d70b2eb713f5c75605419bb2505ce18fa304a (diff)
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
-rw-r--r--sys/netinet/tcp.h4
1 files 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;