mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 20:31:04 +01:00
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: a8b70cf260
("netpfil: Use accessor functions and named constants for all tcphdr flags")
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D43231
This commit is contained in:
parent
1b8d70b2eb
commit
642ac6015b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user