]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix LD_WRAP test in configure
authorEvan Hunt <each@isc.org>
Sat, 5 Sep 2020 19:10:35 +0000 (12:10 -0700)
committerOndřej Surý <ondrej@sury.org>
Thu, 1 Oct 2020 16:09:35 +0000 (18:09 +0200)
The LD_WRAP test in configure was broken, and failed to
indicate LD_WRAP support correctly, resulting in some unit
tests failing to run.

(cherry picked from commit cfa4ea64bc06685f210a4187dcc05cc0aac84851)

configure.ac

index 296824f98b32733056e1d185c40570480b81577b..1201b5e2a799ca235757b949a045122347288e2d 100644 (file)
@@ -2246,11 +2246,11 @@ AC_SUBST([UNITTESTS])
 LD_WRAP_TESTS=false
 AC_MSG_CHECKING([for linker support for --wrap option])
 AX_SAVE_FLAGS([wrap])
-LDFLAGS="-Wl,-wrap,exit"
-AC_LINK_IFELSE(
+LDFLAGS="-Wl,--wrap,exit"
+AC_RUN_IFELSE(
     [AC_LANG_PROGRAM([[#include <stdlib.h>
                       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