]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
configure.ac: handle undefined LEVEL1_DCACHE_LINESIZE
authorSascha Steinbiss <satta@debian.org>
Sat, 30 Apr 2022 12:20:38 +0000 (14:20 +0200)
committerVictor Julien <vjulien@oisf.net>
Tue, 3 May 2022 09:16:07 +0000 (11:16 +0200)
On some platforms (riscv64, s390x) this value is "undefined" as returned
from getconf. We also need to handle this to avoid using the string
"undefined" blindly in further #defines.

configure.ac

index 9780991122e42b32eaa1e5b1f6ddcf222adce786..659ace078dacb2f4c096a951f190c3efb137c7cb 100644 (file)
@@ -2159,7 +2159,7 @@ fi
     AC_PATH_PROG(HAVE_GETCONF_CMD, getconf, "no")
     if test "$HAVE_GETCONF_CMD" != "no"; then
         CLS=$(getconf LEVEL1_DCACHE_LINESIZE)
-        if [test "$CLS" != "" && test "$CLS" != "0"]; then
+        if [test "$CLS" != "undefined" && test "$CLS" != "" && test "$CLS" != "0"]; then
             AC_DEFINE_UNQUOTED([CLS],[${CLS}],[L1 cache line size])
         else
             AC_DEFINE([CLS],[64],[L1 cache line size])