Skip to content

build: fix compatibility with stricter C99 compilers

Sam James requested to merge thesamesam/openldap:clang-16-configure into master

Fix the following warnings:

  • -Wimplicit-int (fatal with Clang 16)
  • -Wimplicit-function-declaration (fatal with Clang 16)
  • -Wincompatible-function-pointer-types (fatal with Clang 16)
  • -Wint-conversion (fatal with Clang 15)
  • Old style prototypes (K&R, removed from C23)

These warnings-now-error led to misconfigurations and failure to build OpenLDAP, as the tests used during configure caused the wrong results to be emitted.

For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki [2], or the (new) c-std-porting mailing list [3].

[0] https://lwn.net/Articles/913505/ [1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 [2] https://wiki.gentoo.org/wiki/Modern_C_porting [3] hosted at lists.linux.dev.

Bug: https://bugs.gentoo.org/871288 Signed-off-by: Sam James sam@gentoo.org

Merge request reports

Loading