-
Notifications
You must be signed in to change notification settings - Fork 11
Replace dist/audit.h with the crau library #199
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
This allows to shorten the names of the enum members. Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Instead, just use a bogus context value in the error case. Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Otherwise, we can't create a new context based on the caller's return address. Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
On macOS, <sys/sdt.h> provides a different interface than Linux. Check if the header is actually usable. Signed-off-by: Daiki Ueno <[email protected]>
That way the caller can decide where and how to maintain the context stack. Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
If the CRAU_MAYBE_UNUSED macro is unset, the crau.h file tries to
automatically detect an appropriate value for it.
This autodetection is using the cpp special operator
`__has_c_attribute` [1], introduced in gcc 11 [2].
When compiling with a gcc older than version 11, the compilation fails
with the error:
In file included from audit.h:22,
from audit.c:26:
crau/crau.h:255:23: error: missing binary operator before token "("
__has_c_attribute (__maybe_unused__)
^
This has been observed, for example, in Rocky Linux 8.10, which
contains a gcc v8.5.0.
The issue happens because the test for the `__has_c_attribute`
availability and the test for the `__maybe_unused__` attribute
are in the same directive. Those tests should be separated in
two different directives, following the same logic described in
the `__has_builtin` documentation [3].
This issue was found in Buildroot, after updating gnutls to
version 3.8.11 in [4].
This commit fixes the issue by splitting the test in two.
[1] https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005fc_005fattribute.html
[2] https://gcc.gnu.org/gcc-11/changes.html#c
[3] https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005fbuiltin.html
[4] https://gitlab.com/buildroot.org/buildroot/-/commit/81dbfe1c2ae848b4eb1f896198d13455df50e548
Reported-by: Neal Frager <[email protected]>
Signed-off-by: Julien Olivain <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
The file was provided to make library integration easier, though it turned out to be too primitive and incomplete. This removes the file in favor of the new crau library. Signed-off-by: Daiki Ueno <[email protected]>
Contributor
Author
|
Let's squash instead of cluttering the commit messages... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This imports crau as a git subtree, as a replacement of dist/audit.h.