diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 40f072bf71..4d6109a0e2 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -191,7 +191,16 @@ AC_DEFUN([SPL_AC_KERNEL], [ dnl # dnl # Default SPL user configuration dnl # -AC_DEFUN([SPL_AC_CONFIG_USER], []) +AC_DEFUN([SPL_AC_CONFIG_USER], [ + dnl # Explicitly check for gawk, we require it for the the usermode + dnl # helper. For some reason the standard awk command does not + dnl # behave correctly when invoked from the usermode helper. + AS_IF([test "x$AWK" != xgawk], [ + AC_MSG_ERROR([ + *** Required util gawk missing. Please install the required + *** gawk package for your distribution and try again.]) + ]) +]) AC_DEFUN([SPL_AC_LICENSE], [ AC_MSG_CHECKING([spl license]) diff --git a/configure b/configure index 4c5df996f4..8792553fec 100755 --- a/configure +++ b/configure @@ -14988,7 +14988,20 @@ _ACEOF ;; - user) ;; + user) + if test "x$AWK" != xgawk; then + + { { $as_echo "$as_me:$LINENO: error: + *** Required util gawk missing. Please install the required + *** gawk package for your distribution and try again." >&5 +$as_echo "$as_me: error: + *** Required util gawk missing. Please install the required + *** gawk package for your distribution and try again." >&2;} + { (exit 1); exit 1; }; } + +fi + + ;; all) @@ -18501,7 +18514,20 @@ _ACEOF - ;; + + if test "x$AWK" != xgawk; then + + { { $as_echo "$as_me:$LINENO: error: + *** Required util gawk missing. Please install the required + *** gawk package for your distribution and try again." >&5 +$as_echo "$as_me: error: + *** Required util gawk missing. Please install the required + *** gawk package for your distribution and try again." >&2;} + { (exit 1); exit 1; }; } + +fi + + ;; srpm) ;; *) { $as_echo "$as_me:$LINENO: result: Error!" >&5 diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c index 956be68822..b9ab7109a3 100644 --- a/module/spl/spl-generic.c +++ b/module/spl/spl-generic.c @@ -338,7 +338,7 @@ EXPORT_SYMBOL(zone_get_hostid); * the requested address. */ #define GET_KALLSYMS_ADDR_CMD \ - "awk '{ if ( $3 == \"kallsyms_lookup_name\") { print $1 } }' " \ + "gawk '{ if ( $3 == \"kallsyms_lookup_name\") { print $1 } }' " \ "/proc/kallsyms >/proc/sys/kernel/spl/kallsyms_lookup_name" static int