DragonFlyBSD Kernel Audit
DF-0730 / build.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-0730 harness build.
# Default (no args): builds with the BUGGY THRESH_COLS=8 (mirrors master).
# With arg "fixed":  builds with THRESH_COLS=15 (mirrors the proposed fix).
set -e
cd "$(dirname "$0")"
MODE="${1:-buggy}"
case "$MODE" in
  buggy)  FLAGS="" ;;
  fixed)  FLAGS="-DTHRESH_COLS=IEEE80211_RATE_MAXSIZE" ;;
  *) echo "usage: $0 [buggy|fixed]"; exit 2 ;;
esac
echo ">> building harness ($MODE): cc $FLAGS -Wall -O2 -o df0730_harness df0730_harness.c"
cc $FLAGS -Wall -O2 -o df0730_harness df0730_harness.c
echo ">> built df0730_harness (rc=$?)"