Re: lwip socket errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hi Will

William Wagner wrote:

> Been looking at getting lwip to set errno when errors occur and am
> struggling a bit. The problem is in
> packages\net\lwip_tcpip\current\src\api\sockets.c:152
> To get it so that errno is set with the macro set_errno you must have
> ERRNO defined. I have changed the cdl so that this is set. However you
> then get a compilation error as errno is undefined. Attached is my
> proposed patch to fix the issue. I realise this is a change to lwip code
> which is best avoided but I can't see any other way of making it work.
> Opinions?

According to the lwIP documentation file doc/sys_arch.txt, the file
include/arch/cc.h "must either include a system-local <errno.h> which
defines the standard *nix error codes, or it should #define
LWIP_PROVIDE_ERRNO to make lwip/arch.h define the codes which are used

Try including errno.h from the file include/arch/cc.h and let us know if
it helps...

John Dallaway
eCos maintainer

Before posting, please read the FAQ:
and search the list archive:

[Linux Embedded]     [U-Boot V2]     [Linux Kernel]     [Linux MIPS]     [Linux ARM]     [Linux for the Blind]     [Linux Resources]     [Photo]     [Yosemite]     [ISDN Cause Codes]     [ECOS Home]

Add to Google Powered by Linux