Skip to content

[main] Source code updates from dotnet/runtime - #8302

Merged
dotnet-maestro[bot] merged 2 commits into
mainfrom
darc-main-4cb18a96-e25f-441d-b008-cde3379f307e
Aug 14, 2026
Merged

dotnet-maestro[bot] merged 2 commits into
mainfrom
darc-main-4cb18a96-e25f-441d-b008-cde3379f307e

Conversation

@dotnet-maestro

Copy link
Copy Markdown
Contributor

Note

This is a codeflow update. It may contain both source code changes from
the source repo
as well as dependency updates. Learn more here.

This pull request brings the following source code changes

From https://github.com/dotnet/runtime

Diff the source with this PR branch
darc vmr diff --name-only https://github.com/dotnet/runtime:691fd960eb500743b4be71373b11b2263bdbc318..https://github.com/dotnet/dotnet:darc-main-4cb18a96-e25f-441d-b008-cde3379f307e

@dotnet-maestro

Copy link
Copy Markdown
Contributor Author

Note

PRs from original repository included in this codeflow update:

💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team August 14, 2026 02:22

@maestro-approver maestro-approver Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akoeplinger

Copy link
Copy Markdown
Member

Failure is related:

    [188/386] Building C object mono/minipal/minipal/CMakeFiles/minipal_objects.dir/thread.c.o
    FAILED: [code=1] mono/minipal/minipal/CMakeFiles/minipal_objects.dir/thread.c.o 
    /Applications/Xcode_16.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -DCOMPILER_SUPPORTS_W_RESERVED_IDENTIFIER -DHAVE_CONFIG_H -DHAVE_LARGE_FILE_SUPPORT=1 -DHOST_UNIX -DSMALL_CONFIG -D_THREAD_SAFE -D_XOPEN_SOURCE -I/Users/runner/work/1/s/src/runtime/artifacts/obj -I/Users/runner/work/1/s/src/runtime/src/native -I/Users/runner/work/1/s/src/runtime/artifacts/obj/mono/iossimulator.arm64.Release/mono/minipal/minipal -Wl,-application_extension -fno-strict-aliasing -fno-strict-overflow -Wall -Wunused -Wmissing-declarations -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes -Wno-format-zero-length -Wno-unused-function -Qunused-arguments -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign -Wno-return-stack-address -Wno-constant-logical-operand -Wno-zero-length-array -Wno-asm-operand-widths -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Werror=return-type -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -O3 -DNDEBUG -std=gnu11 -arch arm64 -isysroot /Applications/Xcode_16.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -mios-simulator-version-min=13.0 -fPIC   -g -fPIC -fvisibility=hidden -ffp-contract=off -MD -MT mono/minipal/minipal/CMakeFiles/minipal_objects.dir/thread.c.o -MF mono/minipal/minipal/CMakeFiles/minipal_objects.dir/thread.c.o.d -o mono/minipal/minipal/CMakeFiles/minipal_objects.dir/thread.c.o -c /Users/runner/work/1/s/src/runtime/src/native/minipal/thread.c
    /Users/runner/work/1/s/src/runtime/src/native/minipal/thread.c:56:5: error: call to undeclared function 'pthread_threadid_np'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
       56 |     pthread_threadid_np(pthread_self(), &thread_id);
          |     ^
    /Users/runner/work/1/s/src/runtime/src/native/minipal/thread.c:100:12: error: call to undeclared function 'pthread_setname_np'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      100 |     return pthread_setname_np(threadName);
          |            ^
    2 errors generated.

/cc @mdh1418

@akoeplinger

Copy link
Copy Markdown
Member

@copilot investigate the changes in dotnet/runtime#132113 and propose a fix for the failure

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

@copilot investigate the changes in dotnet/runtime#132113 and propose a fix for the failure

Root cause: dotnet/runtime#132113 moved the thread-id/thread-name helpers into src/native/minipal/thread.c, which is now compiled into Mono. The Mono native build passes -D_XOPEN_SOURCE, and on Apple platforms that makes <pthread.h> hide the non-portable pthread_threadid_np/pthread_setname_np declarations unless _DARWIN_C_SOURCE is defined — hence the implicit-declaration errors (the file already handled the analogous glibc case with _GNU_SOURCE). Mono's own sources work around this the same way (e.g. mono/utils/mono-threads-posix.c defines _DARWIN_C_SOURCE).

Fix in 6d0d8e1: define _DARWIN_C_SOURCE on __APPLE__ before the includes in thread.c. Verified the file still compiles with -D_XOPEN_SOURCE. This should also be ported to dotnet/runtime so it doesn't regress on the next codeflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants