From ed7f93a57f9a2e6d43a88a34988d708da8c518b0 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Fri, 8 Mar 2019 16:15:05 -0800 Subject: [PATCH] Added lwIP 2.1.2 errno patch --- Makefile | 6 +++++- ext/lwip.patch | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 ext/lwip.patch diff --git a/Makefile b/Makefile index c47234e..de2096f 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,11 @@ CLEAN_SCRIPT := ./ports/clean.sh PACKAGE_SCRIPT := ./ports/package.sh endif -# Patch submodules +# Pull all submodules +update: + git submodule update --init + +# Patch submodules (issue update first) patch: -git -C ext/lwip apply ../lwip.patch -git -C ext/lwip-contrib apply ../lwip-contrib.patch diff --git a/ext/lwip.patch b/ext/lwip.patch new file mode 100644 index 0000000..6ef5d1c --- /dev/null +++ b/ext/lwip.patch @@ -0,0 +1,18 @@ +diff --git a/src/include/lwip/errno.h b/src/include/lwip/errno.h +index 48d6b539..9f59afc8 100644 +--- a/src/include/lwip/errno.h ++++ b/src/include/lwip/errno.h +@@ -174,7 +174,12 @@ extern "C" { + #define EMEDIUMTYPE 124 /* Wrong medium type */ + + #ifndef errno +-extern int errno; ++//extern int errno; ++#if defined(__linux__) && !defined(__ANDROID__) ++ #include ++#else ++ extern int errno; ++#endif + #endif + + #else /* LWIP_PROVIDE_ERRNO */