Skip to content

Commit 1ae2d67

Browse files
mstorsjonaveen521kk
authored andcommitted
configure: Include a header in the check for _beginthread
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
1 parent 8e6ba49 commit 1ae2d67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2960,7 +2960,7 @@ AC_MSG_RESULT([$with_nt_threads])
29602960
if test $with_nt_threads = yes ; then
29612961
AC_MSG_CHECKING([whether linking with nt-threads work])
29622962
AC_LINK_IFELSE([
2963-
AC_LANG_PROGRAM([[]],[[_beginthread(0, 0, 0);]])
2963+
AC_LANG_PROGRAM([[#include <process.h>]],[[_beginthread(0, 0, 0);]])
29642964
],
29652965
[AC_MSG_RESULT([yes])],
29662966
[AC_MSG_ERROR([failed to link with nt-threads])])

0 commit comments

Comments
 (0)