From f88486443ca91417ac3b47d69368b7d1db40eba6 Mon Sep 17 00:00:00 2001 From: "Bruce A. Mah" Date: Fri, 20 May 2016 10:05:24 -0700 Subject: [PATCH] Fix build on FreeBSD 11-CURRENT, as described in issue #413. This caused by a combination of the iperf3 build somehow using the system queue.h on FreeBSD 11 (possibly only on this platform) and TAILQ_END not being defined in the system queue.h. Expanding the TAILQ_END macro to NULL seems to solve the problem. Submitted by: @rbgarga --- src/iperf_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iperf_api.c b/src/iperf_api.c index b374690..e40fb52 100755 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -2601,7 +2601,7 @@ iperf_free_stream(struct iperf_stream *sp) close(sp->buffer_fd); if (sp->diskfile_fd >= 0) close(sp->diskfile_fd); - for (irp = TAILQ_FIRST(&sp->result->interval_results); irp != TAILQ_END(sp->result->interval_results); irp = nirp) { + for (irp = TAILQ_FIRST(&sp->result->interval_results); irp != NULL; irp = nirp) { nirp = TAILQ_NEXT(irp, irlistentries); free(irp); }