diff --git a/c_check b/c_check
index d93b756d..0b0bb426 100644
--- a/c_check
+++ b/c_check
@@ -10,7 +10,7 @@ $hostarch = "x86_64" if ($hostarch eq "amd64");
$hostarch = "arm" if ($hostarch =~ /^arm.*/);
$hostarch = "arm64" if ($hostarch eq "aarch64");
$hostarch = "power" if ($hostarch =~ /^(powerpc|ppc).*/);
-$hostarch = "zarch" if ($hostarch eq "s390x");
+$hostarch = "zarch" if ($hostarch =~ /^s390/);
#$tmpf = new File::Temp( UNLINK => 1 );
$binary = $ENV{"BINARY"};
diff --git a/ctest.c b/ctest.c
index 5e869b90..13252b46 100644
--- a/ctest.c
+++ b/ctest.c
@@ -117,7 +117,7 @@ ARCH_X86_64
ARCH_POWER
#endif
-#if defined(__s390x__) || defined(__zarch__)
+#if defined(__s390x__) || defined(__s390__) || defined(__zarch__)
ARCH_ZARCH
diff --git a/getarch.c b/getarch.c
index 4d960356..5fa1063b 100644
--- a/getarch.c
+++ b/getarch.c
@@ -1138,7 +1138,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define OPENBLAS_SUPPORTED
-#if defined(__zarch__) || defined(__s390x__)
+#if defined(__zarch__) || defined(__s390x__) || defined(__s390__)
#define ZARCH
#include "cpuid_zarch.c"