From 9d0546839cfcf4ca21adb2c25610da270d423718 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sat, 2 Jul 2016 21:53:24 +0200 Subject: [PATCH] init: fix NO_SYS targets build lwip/src/core/init.c:256:32: error: "LWIP_COMPAT_MUTEX" is not defined [-Werror=undef] #if LWIP_TCPIP_CORE_LOCKING && LWIP_COMPAT_MUTEX && !defined(LWIP_COMPAT_MUTEX_ALLOWED) ^ Setting LWIP_TCPIP_CORE_LOCKING is meaningless for NO_SYS targets, therefore checking if LWIP_COMPAT_MUTEX is set does not make sense. Introduced by 42dfa71f97: Make LWIP_TCPIP_CORE_LOCKING==1 the default (and warn if LWIP_COMPAT_MUTEX==1 in that case as mutexes are required to prevent priority inversion on tcpip_thread operations) --- src/core/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/init.c b/src/core/init.c index b78384f9..400e2e5e 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -252,7 +252,7 @@ #ifdef ETHARP_ALWAYS_INSERT #error "ETHARP_ALWAYS_INSERT option is deprecated. Remove it from your lwipopts.h." #endif -#if LWIP_TCPIP_CORE_LOCKING && LWIP_COMPAT_MUTEX && !defined(LWIP_COMPAT_MUTEX_ALLOWED) +#if !NO_SYS && LWIP_TCPIP_CORE_LOCKING && LWIP_COMPAT_MUTEX && !defined(LWIP_COMPAT_MUTEX_ALLOWED) #error "LWIP_COMPAT_MUTEX cannot prevent priority inversion. It is recommended to implement priority-aware mutexes. (Define LWIP_COMPAT_MUTEX_ALLOWED to disable this error.)" #endif