From db7a7b864e8b23e50f8d73517f30472d1a18ee60 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 5 Jan 2020 21:45:18 +0100 Subject: [PATCH] lwipv6: fix build on big endian --- srcpkgs/lwipv6/patches/endian.patch | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 srcpkgs/lwipv6/patches/endian.patch diff --git a/srcpkgs/lwipv6/patches/endian.patch b/srcpkgs/lwipv6/patches/endian.patch new file mode 100644 index 00000000000..525d147b772 --- /dev/null +++ b/srcpkgs/lwipv6/patches/endian.patch @@ -0,0 +1,37 @@ +Source: Debian + +This fixes build on big endian. + +--- lwip-v6/src/include/ipv6/lwip/inet.h ++++ lwip-v6/src/include/ipv6/lwip/inet.h +@@ -52,6 +52,8 @@ + #ifndef __LWIP_INET_H__ + #define __LWIP_INET_H__ + ++#include ++ + #include "lwip/arch.h" + + #include "lwip/opt.h" +@@ -80,21 +82,6 @@ + + /*--------------------------------------------------------------------*/ + +-#ifndef htons +- +-#if BYTE_ORDER == BIG_ENDIAN +-#define htons(x) (x) +-#define ntohs(x) (x) +-#define htonl(x) (x) +-#define ntohl(x) (x) +-#else +-u16_t htons(u16_t x); +-u16_t ntohs(u16_t x); +-u32_t htonl(u32_t x); +-u32_t ntohl(u32_t x); +-#endif /* BYTE_ORDER == LITTLE_ENDIAN */ +- +-#endif + #endif /* __LWIP_INET_H__ */ + +