1 The following patches are taken directly from:
3 https://github.com/esnet/iperf/pull/664
5 as an upstream submission.
7 commit 9a66b3b0349e0a158bb4940b668a5cbc7c245762
8 Author: Philip Prindeville <philipp@redfish-solutions.com>
9 Date: Tue Oct 31 13:44:34 2017 -0600
11 Simplify endianness checks
13 Linux can be built with too many types of C run-time library and it's
14 not reasonable to have to enumerate all of them, especially since at
15 least one of them (MUSL) goes out of its way to not be easily
18 Instead, leverage autoconf better for Linux/BSD to detect either
19 <endian.h> or <sys/endian.h> directly.
21 Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
23 diff --git a/configure.ac b/configure.ac
24 index f57e83f..cfb42ac 100644
27 @@ -103,6 +103,14 @@ AC_CHECK_HEADERS([netinet/sctp.h],
31 +AC_CHECK_HEADER([endian.h],
32 + AC_DEFINE([HAVE_ENDIAN_H], [1], [Define to 1 if you have the <endian.h> header file.]),
33 + AC_CHECK_HEADER([sys/endian.h],
34 + AC_DEFINE([HAVE_SYS_ENDIAN_H], [1], [Define to 1 if you have the <sys/endian.h> header file.]),
35 + AC_MSG_WARN([Couldn't find endian.h or sys/endian.h files: doing compile-time tests.])
39 if test "x$with_openssl" = "xno"; then
40 AC_MSG_WARN( [Building without OpenSSL; disabling iperf_auth functionality.] )
42 diff --git a/src/iperf_config.h.in b/src/iperf_config.h.in
43 index bd03935..a9e51ec 100644
44 --- a/src/iperf_config.h.in
45 +++ b/src/iperf_config.h.in
47 /* Define to 1 if you have the <dlfcn.h> header file. */
50 +/* Define to 1 if you have the <endian.h> header file. */
53 /* Have IPv6 flowlabel support. */
57 /* Define to 1 if the system has the type `struct sctp_assoc_value'. */
58 #undef HAVE_STRUCT_SCTP_ASSOC_VALUE
60 +/* Define to 1 if you have the <sys/endian.h> header file. */
61 +#undef HAVE_SYS_ENDIAN_H
63 /* Define to 1 if you have the <sys/socket.h> header file. */
64 #undef HAVE_SYS_SOCKET_H