lwip
lwip copied to clipboard
Bug in unix/sys_arch.c
The sys_now() function improperly uses a u32_t
type for the usec
variable. This causes large time differences of 4x10^6 to occur when the tv.tv_usec value is less than the starttime.tv_usec value.
If the type of just the usec
variable and the cast are changed to s32_t
, everything is fine.
Can you clarify which file you are referring to? There is no unix/sys_arch.c, and nxpcommon/arch/sys_arch.c doesn't have a usec variable.
Sorry about that, here's the full path:
contrib-1.4.0/ports/unix/sys_arch.c
Oooo, nice catch! Unfortunately I just made this github snapshot for my own easy reference and don't intend to maintain it. I'm sure the upstream project would like to know about this. I don't know offhand exactly where to report it, but http://savannah.nongnu.org/projects/lwip would be a good place to start looking.