Skip to content

Commit b6f1684

Browse files
committed
fixed new zfec still crashing in Win
imroves 2af4ace fix, which didn't work for Windows, since the compiler here doesn't accept include with absolute path: ``` tst.c:4:10: fatal error: '/usr/local/src/zfec/fec.h' file not found 4 | #include "/usr/local/src/zfec/fec.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ``` (neither <> syntax works)
1 parent 0d54328 commit b6f1684

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

configure.ac

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2685,13 +2685,16 @@ if test $cross_compile = no; then
26852685
AC_CHECK_FILES([$ZFEC_PREFIX/fec.c $ZFEC_PREFIX/fec.h], [found_zfec=yes])
26862686
fi
26872687
if test "$found_zfec" = yes; then
2688-
AC_MSG_CHECKING([fec_init declaration in $ZFEC_PREFIX/fec.h])
2688+
S_CFLAGS=$CFLAGS
2689+
CFLAGS="$CFLAGS -I$ZFEC_PREFIX"
2690+
AC_MSG_CHECKING([fec_init declaration in fec.h])
26892691
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2690-
#include "$ZFEC_PREFIX/fec.h"
2692+
#include "fec.h"
26912693
]],
26922694
[[
26932695
#pragma GCC diagnostic error "-Wimplicit-function-declaration"
26942696
fec_init();]])], fec_init=yes, fec_init=no)
2697+
CFLAGS=$S_CFLAGS
26952698
if test "$fec_init" = yes; then
26962699
AC_DEFINE([HAVE_FEC_INIT], [1], [fec_init must be called before fec_new])
26972700
fi

0 commit comments

Comments
 (0)