This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: lwip socket errors


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]