Skip to content

Commit

Permalink
cmake: fix HAVE_H_ERRNO_ASSIGNABLE detection
Browse files Browse the repository at this point in the history
Fix `HAVE_H_ERRNO_ASSIGNABLE` to not run, only compile its test snippet,
aligning this with autotools. This fixes an error when doing
cross-builds and also actually detects this feature. It affected systems
not allowlisted into this, e.g. SerenityOS.

We used this detection result to enable `HAVE_GETADDRINFO_THREADSAFE`.

Follow-up to 04a3a37 #11979
Ref: #12095 (closed in favour of this patch)
Ref: #11964 (effort to sync cmake detections with autotools)

Reported-by: Kartatz on Github
Assisted-by: Kartatz on Github
Fixes #12093
Closes #12094
  • Loading branch information
vszakats committed Oct 12, 2023
1 parent fac90bd commit 104767a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMake/OtherTests.cmake
Expand Up @@ -172,7 +172,7 @@ if(NOT DEFINED HAVE_GETADDRINFO_THREADSAFE)
}" HAVE_H_ERRNO)

if(NOT HAVE_H_ERRNO)
check_c_source_runs("${_source_epilogue}
check_c_source_compiles("${_source_epilogue}
int main(void)
{
h_errno = 2;
Expand Down

0 comments on commit 104767a

Please sign in to comment.