diff options
Diffstat (limited to 'net-misc/iperf/files/iperf-3.12-fix-bashism.patch')
-rw-r--r-- | net-misc/iperf/files/iperf-3.12-fix-bashism.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/net-misc/iperf/files/iperf-3.12-fix-bashism.patch b/net-misc/iperf/files/iperf-3.12-fix-bashism.patch new file mode 100644 index 000000000000..1f3a321f42c9 --- /dev/null +++ b/net-misc/iperf/files/iperf-3.12-fix-bashism.patch @@ -0,0 +1,43 @@ +https://github.com/esnet/iperf/pull/1398 + +From 3a03f775ca103f2e824abef903130280c57ca8ac Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Sun, 2 Oct 2022 02:58:59 +0100 +Subject: [PATCH] config/iperf_config_static_bin.m4: fix bashism + +configure scripts need to be runnable with a POSIX-compliant /bin/sh. + +On many (but not all!) systems, /bin/sh is provided by Bash, so errors +like this aren't spotted. Notably Debian defaults to /bin/sh provided +by dash which doesn't tolerate such bashisms as '=='. + +This retains compatibility with bash. + +Fixes configure warnings/errors like: +``` +./configure: 2670: test: x: unexpected operator +``` + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/config/iperf_config_static_bin.m4 ++++ b/config/iperf_config_static_bin.m4 +@@ -7,6 +7,6 @@ AC_ARG_ENABLE([static-bin], + [:]) + AM_CONDITIONAL([ENABLE_STATIC_BIN], [test x$enable_static_bin = xno]) + +-AS_IF([test "x$enable_static_bin" == xyes], ++AS_IF([test "x$enable_static_bin" = xyes], + [LDFLAGS="$LDFLAGS --static"] + []) +--- a/configure ++++ b/configure +@@ -2667,7 +2667,7 @@ else + fi + + +-if test "x$enable_static_bin" == xyes ++if test "x$enable_static_bin" = xyes + then : + LDFLAGS="$LDFLAGS --static" + + |