Skip to content

Commit

Permalink
configure: prevent bug overwriting config.mak on OpenBSD
Browse files Browse the repository at this point in the history
the command writing the openbsd line was using >> before the call
which was meant to initialize config.mak using >.

closes rofl0r#228
  • Loading branch information
rofl0r committed Apr 12, 2018
1 parent 06c20ed commit bb30d86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ if [ -z "$CC" ] ; then
CC=cc
fi

echo > config.mak

bsd_detected=false
isbsd() {
Expand Down Expand Up @@ -162,7 +163,7 @@ OUR_CPPFLAGS="$OUR_CPPFLAGS -DBROKEN_FCLOSE"
}
check_define __sun && check_define __SVR4 && solaris_detected=true

echo "CC=$CC">config.mak
echo "CC=$CC">>config.mak
[ -z "$CPPFLAGS" ] || echo "CPPFLAGS=$CPPFLAGS">>config.mak
[ -z "$CFLAGS" ] || echo "USER_CFLAGS=$CFLAGS">>config.mak
[ -z "$LDFLAGS" ] || echo "USER_LDFLAGS=$LDFLAGS">>config.mak
Expand Down

0 comments on commit bb30d86

Please sign in to comment.