This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 986ddc83ce netinet/in.h: add macro definitions to resolve compilation
errors
986ddc83ce is described below
commit 986ddc83ce0fb98d0903a783492dbe86826cd251
Author: zhanghongyu <[email protected]>
AuthorDate: Wed Aug 7 21:05:15 2024 +0800
netinet/in.h: add macro definitions to resolve compilation errors
solve the compiling problem of the third-party library,
add IN6_IS_ADDR_MC_LINKLOCAL and IN6_IS_ADDR_SITELOCAL definitions.
Signed-off-by: zhanghongyu <[email protected]>
---
include/netinet/in.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/netinet/in.h b/include/netinet/in.h
index 6901e44e2d..564fa7b390 100644
--- a/include/netinet/in.h
+++ b/include/netinet/in.h
@@ -225,6 +225,12 @@
(a)->s6_addr32[1] == 0 && \
(a)->s6_addr32[2] == HTONL(0xffff))
+#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && ((a)->s6_addr[1] & 0xf) == 0x2)
+
+#define IN6_IS_ADDR_SITELOCAL(a) \
+ (((a)->s6_addr16[0] & HTONS(0xffc0)) == HTONS(0xfec0))
+
/* This macro to convert a 16/32-bit constant values quantity from host byte
* order to network byte order. The 16-bit version of this macro is required
* for uIP: