libs: fix visual studio Compiler Error C2036

D:\code\nuttx\libs\libc\net\lib_inetpton.c(300,52): error C2036: "void *" : unknown size

Reference:
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2036?view=msvc-170

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-02-08 13:58:23 +08:00
committed by Xiang Xiao
parent 4b4cee8916
commit 8761cc9bfc
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -162,7 +162,8 @@
*/
#define IPBUF(hl) ((FAR void *)(IOB_DATA(dev->d_iob) + (hl)))
#define NETLLBUF (IPBUF(0) - NET_LL_HDRLEN(dev))
#define NETLLBUF ((FAR void *) \
((FAR uint8_t *)IPBUF(0) - NET_LL_HDRLEN(dev)))
#define IPv4BUF ((FAR struct ipv4_hdr_s *)IPBUF(0))
#define IPv6BUF ((FAR struct ipv6_hdr_s *)IPBUF(0))