1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:58:11 +00:00

LibC: Use "static inline" for inline functions in arpa/inet.h (#5392)

This makes it work when compiling as C.
This commit is contained in:
jonno85uk 2021-02-17 23:02:47 +00:00 committed by GitHub
parent 8aec1cd232
commit 83d880180e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,7 @@ static inline int inet_aton(const char* cp, struct in_addr* inp)
char* inet_ntoa(struct in_addr);
inline uint16_t htons(uint16_t value)
static inline uint16_t htons(uint16_t value)
{
#if __BYTE_ORDER == __LITTLE_ENDIAN
return __builtin_bswap16(value);
@ -53,12 +53,12 @@ inline uint16_t htons(uint16_t value)
#endif
}
inline uint16_t ntohs(uint16_t value)
static inline uint16_t ntohs(uint16_t value)
{
return htons(value);
}
inline uint32_t htonl(uint32_t value)
static inline uint32_t htonl(uint32_t value)
{
#if __BYTE_ORDER == __LITTLE_ENDIAN
return __builtin_bswap32(value);
@ -67,7 +67,7 @@ inline uint32_t htonl(uint32_t value)
#endif
}
inline uint32_t ntohl(uint32_t value)
static inline uint32_t ntohl(uint32_t value)
{
return htonl(value);
}