httptunnel icon indicating copy to clipboard operation
httptunnel copied to clipboard

htc.c and hts.c missing include of <time.h> for definition of time(...)

Open pjfordham opened this issue 2 years ago • 1 comments

Found as part of this effort: https://fedoraproject.org/wiki/Toolchain/PortingToModernC

When compiling with strict C99 compliance we see that both htc.c and hts.c use time without the correct header being included

hts.c:433: implicit function declaration: time

There does seem to be some confusion on the web about whether sys/time.h should have this and it seems to vary on a per platform basis so simply including time.h might not be the right solution. So more elaborate configure magic might be required.

pjfordham avatar Jan 12 '23 07:01 pjfordham

The files htc.c and htc.s include both time.h and sys/time.h. @pjfordham, please clarify.

larsbrinkhoff avatar May 08 '23 07:05 larsbrinkhoff