about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2021-01-02 23:15:55 +0100
committerhexcoder- <heiko@hexco.de>2021-01-02 23:15:55 +0100
commit848db92196cf9ace34610a9cbf12fcf5ce44de33 (patch)
tree356a30cb5fb94a670e8040caeae3ab9d784b6dd9
parent6ed465bacc80a4909c62252833c85e827bb79593 (diff)
downloadafl++-848db92196cf9ace34610a9cbf12fcf5ce44de33.tar.gz
build_unicorn_support.sh: allow DragonFly to build
-rwxr-xr-xunicorn_mode/build_unicorn_support.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/unicorn_mode/build_unicorn_support.sh b/unicorn_mode/build_unicorn_support.sh
index 9407de3f..8f6ceab7 100755
--- a/unicorn_mode/build_unicorn_support.sh
+++ b/unicorn_mode/build_unicorn_support.sh
@@ -44,7 +44,7 @@ echo "[*] Performing basic sanity checks..."
 
 PLT=`uname -s`
 
-if [ ! "$PLT" = "Linux" ] && [ ! "$PLT" = "Darwin" ] && [ ! "$PLT" = "FreeBSD" ] && [ ! "$PLT" = "NetBSD" ] && [ ! "$PLT" = "OpenBSD" ]; then
+if [ ! "$PLT" = "Linux" ] && [ ! "$PLT" = "Darwin" ] && [ ! "$PLT" = "FreeBSD" ] && [ ! "$PLT" = "NetBSD" ] && [ ! "$PLT" = "OpenBSD" ] && [ ! "$PLT" = "DragonFly" ]; then
 
   echo "[-] Error: Unicorn instrumentation is unsupported on $PLT."
   exit 1
@@ -89,6 +89,12 @@ if [ "$PLT" = "FreeBSD" ]; then
   TARCMD=gtar
 fi
 
+if [ "$PLT" = "DragonFly" ]; then
+  MAKECMD=gmake
+  CORES=`sysctl -n hw.ncpu`
+  TARCMD=tar
+fi
+
 if [ "$PLT" = "NetBSD" ] || [ "$PLT" = "OpenBSD" ]; then
   MAKECMD=gmake
   CORES=`sysctl -n hw.ncpu`