Skip to content

Commit

Permalink
configure: Include a header in the check for _beginthread
Browse files Browse the repository at this point in the history
Previously, the test tried compiling a call to the
_beginthread function without either declaring the function
(and its parameters) or including the corresponding header.

Since Clang 15 (which still is under development, so this may
still change before it's released) [1], implicit function
declarations are a hard error by default, when building code
in C99 mode (or newer).

[1] llvm/llvm-project@7d644e1
  • Loading branch information
mstorsjo authored and lazka committed Jul 19, 2023
1 parent 781595f commit 496b5ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2647,7 +2647,7 @@ AC_MSG_RESULT([$with_nt_threads])
if test $with_nt_threads = yes ; then
AC_MSG_CHECKING([whether linking with nt-threads work])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[]],[[_beginthread(0, 0, 0);]])
AC_LANG_PROGRAM([[#include <process.h>]],[[_beginthread(0, 0, 0);]])
],
[AC_MSG_RESULT([yes])],
[AC_MSG_ERROR([failed to link with nt-threads])])
Expand Down

0 comments on commit 496b5ed

Please sign in to comment.