#!/bin/sh
# DF-0525 build: validate the fix compiles (module build of ng_fec.ko).
# Run on the DragonFly guest as root from a tree where fix.diff is applied.
set -e
SRC=/usr/src
echo "[*] applying fix.diff"
( cd "$SRC" && patch -p1 --forward < /root/df0525_fix.diff ) || true
echo "[*] building ng_fec.ko"
( cd "$SRC/sys/netgraph/fec" && make )
echo "[*] built: $(ls -l /usr/obj/usr/src/sys/netgraph/fec/ng_fec.ko 2>/dev/null || ls -l $SRC/sys/netgraph/fec/ng_fec.ko)"
