Skip to content

Commit

Permalink
autoconf: Fix clang-16 breakage
Browse files Browse the repository at this point in the history
-Wint-conversion becomes an error by default in clang-16, causing the
program_invocation_short_name test to fail.

Bug: https://bugs.gentoo.org/893910
  • Loading branch information
MatthewGentoo committed Feb 12, 2023
1 parent 6426362 commit 2cebd28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ case ${host_os} in
fi
fi
AC_CACHE_CHECK(for program_invocation_short_name, ac_cv_program_invocation_short_name,[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([extern char* program_invocation_short_name;],[return program_invocation_short_name;])],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([extern char* program_invocation_short_name;],[return program_invocation_short_name[0];])],
[ac_cv_program_invocation_short_name=yes],
[ac_cv_program_invocation_short_name=no]
)
])
if test "x$ac_cv_program_invocation_short_name" = "xyes"; then
AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME, 1, [Define if you have program_invocation_short_name])
AC_CACHE_CHECK(if program_invocation_short_name is declared in errno.h, ac_cv_program_invocation_short_name_errno_h,[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <errno.h>],[return program_invocation_short_name;])],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <errno.h>],[return program_invocation_short_name[0];])],
[ac_cv_program_invocation_short_name_errno_h=yes],
[ac_cv_program_invocation_short_name_errno_h=no]
)
Expand Down

0 comments on commit 2cebd28

Please sign in to comment.