Replace lwIP byte order functions with built-in functions

This commit is contained in:
José Simões 2021-12-29 09:49:18 +00:00 committed by GitHub
parent 5624dffc52
commit dd9fe9761a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,6 +50,12 @@ extern "C" {
#define BYTE_ORDER LITTLE_ENDIAN
#endif // BYTE_ORDER
#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS
#define htons(x) __builtin_bswap16(x)
#define ntohs(x) __builtin_bswap16(x)
#define htonl(x) __builtin_bswap32(x)
#define ntohl(x) __builtin_bswap32(x)
#ifndef CONFIG_LWIP_ESP_LWIP_ASSERT
#define LWIP_NOASSERT 1
#endif