summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorKenneth Myhra <kennethmyhra@gmail.com>2021-09-19 11:05:01 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-19 15:53:43 +0200
commitc7422dcef713cc80e0af447e853d37e9fbb6590c (patch)
treed1d83439faea3674cbf8a35c5199743de376e9a6 /Userland
parente649144a90ec8b8ec1c7c5bc11790e711abc648f (diff)
downloadserenity-c7422dcef713cc80e0af447e853d37e9fbb6590c.zip
LibC: Declare IN6_IS_ADDR_V4MAPPED correctly
When using the IN6_IS_ADDR_V4MAPPED macro in Serenity's LibC it would fail when compiling with the error message: 'invalid type argument of '->''. This patch corrects the macro so that e.g. GLib port can compile again.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibC/netinet/in.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibC/netinet/in.h b/Userland/Libraries/LibC/netinet/in.h
index 7be4b579a6..25e58de240 100644
--- a/Userland/Libraries/LibC/netinet/in.h
+++ b/Userland/Libraries/LibC/netinet/in.h
@@ -45,6 +45,6 @@ static inline uint32_t ntohl(uint32_t value)
(addr->s6_addr[0] == 0 && addr->s6_addr[1] == 0 && addr->s6_addr[2] == 0 && addr->s6_addr[3] == 0 && addr->s6_addr[4] == 0 && addr->s6_addr[5] == 0 && addr->s6_addr[6] == 0 && addr->s6_addr[7] == 0 && addr->s6_addr[8] == 0 && addr->s6_addr[9] == 0 && addr->s6_addr[10] == 0 && addr->s6_addr[11] == 0 && addr->s6_addr[12] == 0 && addr->s6_addr[13] == 0 && addr->s6_addr[14] == 0 && addr->s6_addr[15] == 1)
#define IN6_IS_ADDR_V4MAPPED(addr) \
- (addr->s6_addr[0] == 0 && addr->s6_addr[1] == 0 && addr->s6_addr[2] == 0 && addr->s6_addr[3] == 0 && addr->s6_addr[4] == 0 && addr->s6_addr[5] == 0 && addr->s6_addr[6] == 0 && addr->s6_addr[7] == 0 && addr->s6_addr[8] == 0xff && addr->s6_addr[9] == 0xff && addr->s6_addr[10] == 0xff && addr->s6_addr[11] == 0xff)
+ ((((addr)->s6_addr[0]) == 0) && (((addr)->s6_addr[1]) == 0) && (((addr)->s6_addr[2]) == 0) && (((addr)->s6_addr[3]) == 0) && (((addr)->s6_addr[4]) == 0) && (((addr)->s6_addr[5]) == 0xFFFF))
__END_DECLS