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

Prevent inttypes.h from being wrapped in namespace #24

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

brodeuralexis
Copy link
Contributor

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area plugin-sdk

/area tests

What this PR does / why we need it:

By wrapping C includes in a namespace declaration, we make it so that any libc headers will also belong to the resulting C namespace. In the case of inttypes.h, this creates problems in the user's code when depending on declarations like imaxdiv_t to be in the global namespace and not falcosecurity::_internal. This problem is also compounded when combining the SDK with libraries with their own header files.

This PR simply adds a line to deps.h to ensure that inttypes.h is included before a namespace is opened.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@poiana
Copy link

poiana commented Sep 25, 2023

Welcome @brodeuralexis! It looks like this is your first PR to falcosecurity/plugin-sdk-cpp 🎉

@poiana poiana added the size/XS label Sep 25, 2023
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link

poiana commented Nov 30, 2023

LGTM label has been added.

Git tree hash: 17856c5fab7bdb7c3a910186a99443dd731f3034

@poiana
Copy link

poiana commented Nov 30, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brodeuralexis, FedeDP

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 70d5feb into falcosecurity:master Nov 30, 2023
3 checks passed
@FedeDP
Copy link
Contributor

FedeDP commented Nov 30, 2023

Sorry for the long time no see :)
LGTM! Thank you very much!

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

Successfully merging this pull request may close these issues.

3 participants