Re: [PATCH 4/4] autofs-5.1.8 - configure: LDAP function checks ignore implicit declarations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/8/22 19:56, ThomasReim wrote:
From: Thomas Reim <reimth@xxxxxxxxx>

Wrong CFLAGS: gcc handles implicit function declaration as warning with current
flag settings. Missing functions in libldap will not be identified.

Another good catch.


Ian


Signed-off-by: Thomas Reim <reimth@xxxxxxxxx>
---
  aclocal.m4 | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/aclocal.m4 b/aclocal.m4
index 91b22da..9fc20bf 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -379,6 +379,8 @@ AC_DEFUN([AF_CHECK_FUNC_LDAP_CREATE_PAGE_CONTROL],
  # save current libs
  af_check_ldap_create_page_control_save_libs="$LIBS"
  LIBS="$LIBS -lldap"
+af_check_ldap_create_page_control_save_cflags="$CFLAGS"
+CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
AC_TRY_LINK(
    [ #include <ldap.h> ],
@@ -399,6 +401,7 @@ fi
# restore libs
  LIBS="$af_check_ldap_create_page_control_save_libs"
+CFLAGS="$af_check_ldap_create_page_control_save_cflags"
  ])
dnl --------------------------------------------------------------------------
@@ -412,6 +415,8 @@ AC_DEFUN([AF_CHECK_FUNC_LDAP_PARSE_PAGE_CONTROL],
  # save current libs
  af_check_ldap_parse_page_control_save_libs="$LIBS"
  LIBS="$LIBS -lldap"
+af_check_ldap_parse_page_control_save_cflags="$CFLAGS"
+CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
AC_TRY_LINK(
    [ #include <ldap.h> ],
@@ -432,6 +437,7 @@ fi
# restore libs
  LIBS="$af_check_ldap_parse_page_control_save_libs"
+CFLAGS="$af_check_ldap_parse_page_control_save_cflags"
  ])
dnl --------------------------------------------------------------------------



[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux