diff --git a/config.sh b/config.sh
index 8d586cfde54fa3c3bc369ff0156ad5d55a79f383..424cbda346869c7476859d55a600c414c86bbb46 100644
--- a/config.sh
+++ b/config.sh
@@ -73,7 +73,7 @@ *-Werror*)
werror="-Werror"
;;
esac
- if $CC $werror "$@" -o /dev/null "$outdir"/check.c >/dev/null 2>&1
+ if $CC $werror "$@" -o "$outdir"/check "$outdir"/check.c >/dev/null 2>&1
then
append_cflags "$@"
else