mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-14 07:24:32 +00:00
fe94460d53
localtime() was called with pointers to tv_sec, which is time_t on some platforms and long on others. A problem was encountered on Sparc64 under OpenBSD where tv_sec is long (64 bits) and time_t is 32 bits. Since this architecture is big-endian, it exhibited the bug because localtime() always worked with the high part of the value which is always zero. This problem was identified and debugged by Thierry Fournier. The correct solution is to pass the date by value and not by pointer, through an intermediate function. The use of localtime_r() instead of localtime() also made it possible to get rid of the first call to localtime() since it does not need to allocate memory anymore. |
||
---|---|---|
.. | ||
common | ||
import | ||
proto | ||
types |