diff --git a/configure.ac b/configure.ac index 12170df1bf..9ddad8edf4 100644 --- a/configure.ac +++ b/configure.ac @@ -1320,11 +1320,11 @@ AM_CONDITIONAL([HAVE_CMOCKA], [test "$with_cmocka" = "yes"]) LD_WRAP_TESTS=false AC_MSG_CHECKING([for linker support for --wrap option]) AX_SAVE_FLAGS([wrap]) -LDFLAGS="-Wl,-wrap,exit" +LDFLAGS="-Wl,--wrap,exit" AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include void __real_exit (int status); - void __wrap_exit (int status) { __real_exit (status); } + void __wrap_exit (int status) { __real_exit (0); } ]], [[exit (1);]])], [LD_WRAP_TESTS=true