mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-14 04:06:35 +08:00
Try to fix !defined(LWIP_PROVIDE_ERRNO)
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
|
||||
#include "lwip/errno.h"
|
||||
|
||||
#if !NO_SYS
|
||||
/** Table to quickly map an lwIP error (err_t) to a socket error
|
||||
* by using -err as an index */
|
||||
static const int err_to_errno_table[] = {
|
||||
@@ -63,6 +64,7 @@ static const int err_to_errno_table[] = {
|
||||
ENOTCONN, /* ERR_CLSD -15 Connection closed. */
|
||||
EIO /* ERR_ARG -16 Illegal argument. */
|
||||
};
|
||||
#endif /* !NO_SYS */
|
||||
|
||||
#ifdef LWIP_DEBUG
|
||||
|
||||
@@ -103,6 +105,7 @@ lwip_strerr(err_t err)
|
||||
|
||||
#endif /* LWIP_DEBUG */
|
||||
|
||||
#if !NO_SYS
|
||||
int
|
||||
err_to_errno(err_t err)
|
||||
{
|
||||
@@ -111,3 +114,4 @@ err_to_errno(err_t err)
|
||||
}
|
||||
return err_to_errno_table[-err];
|
||||
}
|
||||
#endif /* !NO_SYS */
|
||||
|
||||
Reference in New Issue
Block a user