Skip to content

Commit b9f9813

Browse files
Lt-Flashrazvancrainea
authored andcommitted
net: include timer.h where the TCP connection macros need it
tcp_conn_set_lifetime() and tcp_conn_set_msg_read_timeout() in net/tcp_conn_defs.h call get_ticks(), but the header does not include timer.h. With the default Makefile.conf it arrives anyway, through mem/shm_mem.h -> shm_mem_dbg.h -> lib/dbg/struct_hist.h, but that path exists only with DBG_MALLOC. test/fuzz/oss-fuzz-build.sh disables DBG_MALLOC, so since net/proxy_protocol.c started calling tcp_conn_reset_lifetime() (4e2758f) the fuzz build stops there with clang: net/proxy_protocol.c:201:3: error: call to undeclared function 'get_ticks'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] Include timer.h in the header that uses it. (cherry picked from commit fa98925)
1 parent ddfdf43 commit b9f9813

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎net/tcp_conn_defs.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939
#include "../locking.h"
4040
#include "../ip_addr.h"
41+
#include "../timer.h"
4142
#include "tcp_conn_profile.h"
4243
#include "proto_tcp/tcp_common_defs.h"
4344

0 commit comments

Comments
 (0)