mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 21:44:38 +08:00
Try to fix !defined(LWIP_PROVIDE_ERRNO)
This commit is contained in:
parent
740182de3c
commit
69be49fdc3
@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
#include "lwip/errno.h"
|
#include "lwip/errno.h"
|
||||||
|
|
||||||
|
#if !NO_SYS
|
||||||
/** Table to quickly map an lwIP error (err_t) to a socket error
|
/** Table to quickly map an lwIP error (err_t) to a socket error
|
||||||
* by using -err as an index */
|
* by using -err as an index */
|
||||||
static const int err_to_errno_table[] = {
|
static const int err_to_errno_table[] = {
|
||||||
@ -63,6 +64,7 @@ static const int err_to_errno_table[] = {
|
|||||||
ENOTCONN, /* ERR_CLSD -15 Connection closed. */
|
ENOTCONN, /* ERR_CLSD -15 Connection closed. */
|
||||||
EIO /* ERR_ARG -16 Illegal argument. */
|
EIO /* ERR_ARG -16 Illegal argument. */
|
||||||
};
|
};
|
||||||
|
#endif /* !NO_SYS */
|
||||||
|
|
||||||
#ifdef LWIP_DEBUG
|
#ifdef LWIP_DEBUG
|
||||||
|
|
||||||
@ -103,6 +105,7 @@ lwip_strerr(err_t err)
|
|||||||
|
|
||||||
#endif /* LWIP_DEBUG */
|
#endif /* LWIP_DEBUG */
|
||||||
|
|
||||||
|
#if !NO_SYS
|
||||||
int
|
int
|
||||||
err_to_errno(err_t err)
|
err_to_errno(err_t err)
|
||||||
{
|
{
|
||||||
@ -111,3 +114,4 @@ err_to_errno(err_t err)
|
|||||||
}
|
}
|
||||||
return err_to_errno_table[-err];
|
return err_to_errno_table[-err];
|
||||||
}
|
}
|
||||||
|
#endif /* !NO_SYS */
|
||||||
|
@ -108,7 +108,9 @@ extern const char *lwip_strerr(err_t err);
|
|||||||
#define lwip_strerr(x) ""
|
#define lwip_strerr(x) ""
|
||||||
#endif /* LWIP_DEBUG */
|
#endif /* LWIP_DEBUG */
|
||||||
|
|
||||||
|
#if !NO_SYS
|
||||||
int err_to_errno(err_t err);
|
int err_to_errno(err_t err);
|
||||||
|
#endif /* !NO_SYS */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -173,6 +173,13 @@
|
|||||||
extern int errno;
|
extern int errno;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#else /* LWIP_PROVIDE_ERRNO */
|
||||||
|
|
||||||
|
/* Define LWIP_ERRNO_INCLUDE to <errno.h> to include the error defines here */
|
||||||
|
#ifdef LWIP_ERRNO_INCLUDE
|
||||||
|
#include LWIP_ERRNO_INCLUDE
|
||||||
|
#endif /* LWIP_ERRNO_INCLUDE */
|
||||||
|
|
||||||
#endif /* LWIP_PROVIDE_ERRNO */
|
#endif /* LWIP_PROVIDE_ERRNO */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user