diff options
| author | christos <christos@NetBSD.org> | 2021-02-17 22:32:04 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2021-02-17 22:32:04 +0000 |
| commit | 32f6d56abd9ec4fdb65ca89352f5b9775f7bc5ee (patch) | |
| tree | 4f17cf36a15a537591268e2d0b3dad414ca9259a /sys/netinet6 | |
| parent | 23754a6e6cf98a6df90b2f47af1dd0251cfbbdc8 (diff) | |
- pass the alignment instead of the mask (as Roy asked and to match the
other macro)
- use alignof to determine that alignment and CTASSERT what we expect
- remove unused macros
Diffstat (limited to 'sys/netinet6')
| -rw-r--r-- | sys/netinet6/ip6_private.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet6/ip6_private.h b/sys/netinet6/ip6_private.h index 4edceebd29d..7ea19b01db1 100644 --- a/sys/netinet6/ip6_private.h +++ b/sys/netinet6/ip6_private.h @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_private.h,v 1.4 2021/02/14 20:58:35 christos Exp $ */ +/* $NetBSD: ip6_private.h,v 1.5 2021/02/17 22:32:04 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -43,7 +43,8 @@ extern percpu_t *ip6stat_percpu; #define IP6_STATINC(x) _NET_STATINC(ip6stat_percpu, x) #define IP6_STATDEC(x) _NET_STATDEC(ip6stat_percpu, x) -#define IP6_HDR_ALIGNMENT 3 +#define IP6_HDR_ALIGNMENT __alignof(struct ip6_hdr) +__CTASSERT(IP6_HDR_ALIGNMENT == 4); #endif /* _KERNEL */ #endif /* !_NETINET_IP6_PRIVATE_H_ */ |
