-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/9.0-staging] Fix hostfxr.h to be valid C again. #110060
[release/9.0-staging] Fix hostfxr.h to be valid C again. #110060
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. please get a code review. we will take for consideration in 9.0.x
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
// hostfxr.h is a public API. When included in .c files, it may fail to compile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounded like there might be one or two other headers that could benefit from similar protection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely! The three documented headers: https://learn.microsoft.com/en-us/dotnet/core/tutorials/netcore-hosting
#include <nethost.h>
#include <coreclr_delegates.h>
#include <hostfxr.h>
I'll fix it in main.
Co-authored-by: Adeel Mujahid <[email protected]>
Backport of #109763 to release/9.0-staging
/cc @elinor-fung @alexrp
Customer Impact
hostfxr.h
provided for customers doing custom hosting is not valid C, so consumers in C cannot not use the latest version.Regression
Regressed in 9.0 with #101451.
Testing
Manual.
Risk
Low. The change just adds the
struct
keyword for a function parameter such that the header is valid C again.