[ECOS] Re: lwip socket errors

John Dallaway john@dallaway.org.uk
Fri Feb 18 20:41:00 GMT 2011


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
throughout".

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

John Dallaway
eCos maintainer
http://www.dallaway.org.uk/john

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list