aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce A. Mah <bmah@es.net>2020-08-14 13:25:51 -0700
committerGitHub <noreply@github.com>2020-08-14 13:25:51 -0700
commit70c85f62dfeb4d343944241a30863f2db66ea419 (patch)
tree57ae665a1def9db190cf814ba1f581149dde7c9a
parente551fbcfc2dd97c725783504f5e4e3da32bba512 (diff)
downloadiperf3-70c85f62dfeb4d343944241a30863f2db66ea419.tar.gz
fix: Unbreak build on CentOS 6. (#1040)
The fix eliminates a duplicate definition of the iperf_size_t datatype when both iperf.h and iperf_api.h are included. Fixes #1039.
-rw-r--r--src/iperf.h2
-rw-r--r--src/iperf_api.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/iperf.h b/src/iperf.h
index 6201a07..5b1da46 100644
--- a/src/iperf.h
+++ b/src/iperf.h
@@ -68,7 +68,9 @@
#include <openssl/evp.h>
#endif // HAVE_SSL
+#if !defined(__IPERF_API_H)
typedef uint64_t iperf_size_t;
+#endif // __IPERF_API_H
struct iperf_interval_results
{
diff --git a/src/iperf_api.h b/src/iperf_api.h
index 63228d9..a51b773 100644
--- a/src/iperf_api.h
+++ b/src/iperf_api.h
@@ -45,7 +45,9 @@ struct iperf_interval_results;
struct iperf_stream;
struct iperf_time;
+#if !defined(__IPERF_H)
typedef uint64_t iperf_size_t;
+#endif // __IPERF_H
/* default settings */
#define Ptcp SOCK_STREAM