Skip to content
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

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 21, 2024

Backport of #109763 to release/9.0-staging

/cc @elinor-fung @alexrp

Customer Impact

  • Customer reported
  • Found internally

hostfxr.h provided for customers doing custom hosting is not valid C, so consumers in C cannot not use the latest version.

Regression

  • Yes
  • No

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.

@elinor-fung elinor-fung added the Servicing-consider Issue for next servicing release review label Nov 21, 2024
@elinor-fung elinor-fung added this to the 9.0.x milestone Nov 21, 2024
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a 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
Copy link
Member

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?

Copy link
Member

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 <3840695+am11@users.noreply.github.com>
@elinor-fung elinor-fung merged commit b0f058b into release/9.0-staging Nov 28, 2024
149 checks passed
@elinor-fung elinor-fung deleted the backport/pr-109763-to-release/9.0-staging branch November 28, 2024 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Host Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants