Get the proper declaration from tcpd.h and pass the appropriate number
of pointer arguments. This avoids relying on an implicit declaration.

Bug: https://bugs.gentoo.org/962943
---
 configure.ac | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index ac6e6c5952c2..41e17ab3c76f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -590,8 +590,10 @@ if test "$with_wrap" = yes; then
   AC_MSG_CHECKING(hosts_ctl in -lwrap);
   save_LIBS=$LIBS
   LIBS="$save_LIBS -lwrap"
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([[int allow_severity = 1; int deny_severity 
= 1;]],
-                                  [[hosts_ctl()]])],
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
+#include <tcpd.h>
+int allow_severity = 1; int deny_severity = 1;]],
+                                  [[hosts_ctl(NULL, NULL, NULL, NULL)]])],
                  [eval "ac_cv_lib_wrap_hosts_ctl=yes"],
                 [eval "ac_cv_lib_wrap_hosts_ctl=no"])
   LIBS=$save_LIBS
-- 
2.53.0


  • [PATCH] con... Mike Gilbert
    • Re: co... Simon Josefsson via Bug reports for the GNU Internet utilities
      • Re... Mike Gilbert
        • ... Simon Josefsson via Bug reports for the GNU Internet utilities
          • ... Mike Gilbert

Reply via email to