[elinks-dev] elinks and 64-bit time_t
vext01 at gmail.com
Thu Oct 10 13:31:52 PDT 2013
I have just comitted a fix for elinks to OpenBSD:
The timeval_T struct defined in src/util/time.h uses a long for the seconds.
Pointers to this struct are then passed to select(2), which expects a
pointer to a timeval_t (from sys/time.h). On OpenBSD (and probably other
platforms too), the seconds field in a timeval_t is a 64-bit signed integer
(a.k.a. time_t). So to use a long for the seconds field is wrong, since on
some arches (e.g. i386), a long is 4 bytes. This screws things up and makes
calls to select(2) fail, thus elinks fails to run.
There is a comment above the timeval_T definition which I don't pretend to
understand. Why don't you use the host system's timeval_t from sys/time.h,
rather than defining your own?
More information about the elinks-dev