From 35b011d4cf4c4b480f8859c456587a884ec9d287 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Mon, 24 Sep 2018 22:24:17 +0200 Subject: [PATCH] Fix compiling lwiperf_example.c with TCP disabled --- examples/lwiperf/lwiperf_example.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/lwiperf/lwiperf_example.c b/examples/lwiperf/lwiperf_example.c index b406f96..b53b0d3 100644 --- a/examples/lwiperf/lwiperf_example.c +++ b/examples/lwiperf/lwiperf_example.c @@ -30,6 +30,7 @@ #include "lwip/apps/lwiperf.h" #include "lwiperf_example.h" +#if LWIP_TCP static void lwiperf_report(void *arg, enum lwiperf_report_type report_type, const ip_addr_t* local_addr, u16_t local_port, const ip_addr_t* remote_addr, u16_t remote_port, @@ -42,9 +43,12 @@ lwiperf_report(void *arg, enum lwiperf_report_type report_type, printf("IPERF report: type=%d, remote: %s:%d, total bytes: %"U32_F", duration in ms: %"U32_F", kbits/s: %"U32_F"\n", (int)report_type, ipaddr_ntoa(remote_addr), (int)remote_port, bytes_transferred, ms_duration, bandwidth_kbitpsec); } +#endif /* LWIP_TCP */ void lwiperf_example_init(void) { +#if LWIP_TCP lwiperf_start_tcp_server_default(lwiperf_report, NULL); +#endif }