Skip to content

Commit

Permalink
fixed new zfec still crashing in Win
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
MartinPulec committed Nov 8, 2023
1 parent bbc3806 commit 1867c0c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2561,13 +2561,16 @@ if test $cross_compile = no && test "$zfec_req" != no; then
AC_CHECK_FILES([$ZFEC_PREFIX/fec.c $ZFEC_PREFIX/fec.h], [found_zfec=yes])
fi
if test "$found_zfec" = yes; then
AC_MSG_CHECKING([fec_init declaration in $ZFEC_PREFIX/fec.h])
S_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -I$ZFEC_PREFIX"
AC_MSG_CHECKING([fec_init declaration in fec.h])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include "$ZFEC_PREFIX/fec.h"
#include "fec.h"
]],
[[
#pragma GCC diagnostic error "-Wimplicit-function-declaration"
fec_init();]])], fec_init=yes, fec_init=no)
CFLAGS=$S_CFLAGS
if test "$fec_init" = yes; then
AC_DEFINE([HAVE_FEC_INIT], [1], [fec_init must be called before fec_new])
fi
Expand Down

0 comments on commit 1867c0c

Please sign in to comment.