>From 106c473a344b78de23a67b749f218911006577ab Mon Sep 17 00:00:00 2001 From: Will Wagner Date: Fri, 18 Feb 2011 09:44:57 +0000 Subject: [PATCH] ensure that if error support is enabled, errno gets set on error in lwip --- packages/net/lwip_tcpip/current/cdl/lwip_net.cdl | 2 +- packages/net/lwip_tcpip/current/src/api/sockets.c | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/packages/net/lwip_tcpip/current/cdl/lwip_net.cdl b/packages/net/lwip_tcpip/current/cdl/lwip_net.cdl index 900ff1f..3f1b71b 100644 --- a/packages/net/lwip_tcpip/current/cdl/lwip_net.cdl +++ b/packages/net/lwip_tcpip/current/cdl/lwip_net.cdl @@ -1909,7 +1909,7 @@ cdl_package CYGPKG_NET_LWIP { display "Additional compiler flags" flavor data no_define - default_value { "" } + default_value { CYGPKG_ERROR_ERRNO ? "-DERRNO" : "" } description " This option modifies the set of compiler flags for building the lwIP package. These flags are used in addition to the set of diff --git a/packages/net/lwip_tcpip/current/src/api/sockets.c b/packages/net/lwip_tcpip/current/src/api/sockets.c index 59d5a7a..e25bb92 100644 --- a/packages/net/lwip_tcpip/current/src/api/sockets.c +++ b/packages/net/lwip_tcpip/current/src/api/sockets.c @@ -150,6 +150,7 @@ static const int err_to_errno_table[] = { err_to_errno_table[-(err)] : EIO) #ifdef ERRNO +#include #ifndef set_errno #define set_errno(err) errno = (err) #endif -- 1.7.2.3