git: 511b35866a8a - main - ifnet: fix if_strings.h build check

From: Alexander V. Chernikov <melifaro_at_FreeBSD.org>
Date: Fri, 16 Jun 2023 15:54:36 UTC
The branch main has been updated by melifaro:

URL: https://cgit.FreeBSD.org/src/commit/?id=511b35866a8af69998f37be3b67859daddf5824e

commit 511b35866a8af69998f37be3b67859daddf5824e
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2023-06-16 15:54:29 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2023-06-16 15:54:29 +0000

    ifnet: fix if_strings.h build check
---
 sys/net/if_strings.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/net/if_strings.h b/sys/net/if_strings.h
index 95d85f5370ed..bea15cfa9de5 100644
--- a/sys/net/if_strings.h
+++ b/sys/net/if_strings.h
@@ -100,7 +100,10 @@ static const char *ifcap_bit_names[] = {
 	IFCAP_RXTLS4_NAME,
 	IFCAP_RXTLS6_NAME,
 };
+
+#ifdef IFCAP_B_SIZE
 _Static_assert(sizeof(ifcap_bit_names) >= IFCAP_B_SIZE * sizeof(char *),
     "ifcap bit names missing from ifcap_bit_names");
+#endif
 
 #endif