about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2019-12-20 16:37:48 +0000
committerDavid Carlier <devnexen@gmail.com>2019-12-20 16:37:48 +0000
commit5f0a252faeb70fae1444417d249f26ec73bc9fd9 (patch)
tree780a11d27b86e3c54b396c2cf0c799a8a6f1a788
parentd8fb4a8e19b1fde9ca4b3f84d5599be824f03ee9 (diff)
downloadafl++-5f0a252faeb70fae1444417d249f26ec73bc9fd9.tar.gz
On non Linux systems, (g)make distrib stops halfway
because of QEMU not supported.
Symplifying cores counting data gathering.
-rwxr-xr-xqemu_mode/build_qemu_support.sh2
-rwxr-xr-xunicorn_mode/build_unicorn_support.sh6
2 files changed, 4 insertions, 4 deletions
diff --git a/qemu_mode/build_qemu_support.sh b/qemu_mode/build_qemu_support.sh
index afd82f72..9da51cfd 100755
--- a/qemu_mode/build_qemu_support.sh
+++ b/qemu_mode/build_qemu_support.sh
@@ -44,7 +44,7 @@ echo "[*] Performing basic sanity checks..."
 if [ ! "`uname -s`" = "Linux" ]; then
 
   echo "[-] Error: QEMU instrumentation is supported only on Linux."
-  exit 1
+  exit 0
 
 fi
 
diff --git a/unicorn_mode/build_unicorn_support.sh b/unicorn_mode/build_unicorn_support.sh
index 1c176bca..e46cf54f 100755
--- a/unicorn_mode/build_unicorn_support.sh
+++ b/unicorn_mode/build_unicorn_support.sh
@@ -73,19 +73,19 @@ if [ "$PLT" = "Linux" ]; then
 fi
 
 if [ "$PLT" = "Darwin" ]; then
-  CORES=`sysctl hw.ncpu | cut -d' ' -f2`
+  CORES=`sysctl -n hw.ncpu`
   TARCMD=tar
 fi
 
 if [ "$PLT" = "FreeBSD" ]; then
   MAKECMD=gmake
-  CORES=`sysctl hw.ncpu | cut -d' ' -f2`
+  CORES=`sysctl -n hw.ncpu`
   TARCMD=gtar
 fi
 
 if [ "$PLT" = "NetBSD" ] || [ "$PLT" = "OpenBSD" ]; then
   MAKECMD=gmake
-  CORES=`sysctl hw.ncpu | cut -d'=' -f2`
+  CORES=`sysctl -n hw.ncpu`
   TARCMD=gtar
 fi