diff options
author | Kenneth Myhra <kennethmyhra@gmail.com> | 2021-09-19 11:05:01 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-19 15:53:43 +0200 |
commit | c7422dcef713cc80e0af447e853d37e9fbb6590c (patch) | |
tree | d1d83439faea3674cbf8a35c5199743de376e9a6 /Userland | |
parent | e649144a90ec8b8ec1c7c5bc11790e711abc648f (diff) | |
download | serenity-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.h | 2 |
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 |