falcosecurity / plugin-sdk-go

Falco plugins SDK for Go
Apache License 2.0
26 stars 17 forks source link

fix: plugin_loader compilation errors across different version of glibc #81

Closed leogr closed 1 year ago

leogr commented 1 year ago

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:

This is a follow-up PR for https://github.com/falcosecurity/plugin-sdk-go/pull/80

Unfortunately, #80 worked only for glibc >= 2.38. This PR always uses the same strlcpy internal implementation, so it works in any case.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Since we don't use cmake here, we can't just decide a built time which declaration to use (as we do in libs)

Does this PR introduce a user-facing change?:

fix: address `strlcpy` declaration error at compile time
leogr commented 1 year ago

/kind bug

poiana commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jasondellaluce, leogr

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: - ~~[OWNERS](https://github.com/falcosecurity/plugin-sdk-go/blob/main/OWNERS)~~ [jasondellaluce,leogr] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment