-
Notifications
You must be signed in to change notification settings - Fork 127
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
Makefile: fix seccomp notify compilation issues #280
Makefile: fix seccomp notify compilation issues #280
Conversation
Signed-off-by: Peter Hunt <[email protected]>
Signed-off-by: Peter Hunt <[email protected]>
fixes #275 |
LGTM |
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
Makefile
Outdated
endif | ||
|
||
ifeq ($(shell $(PKG_CONFIG) --atleast-version 2.5.0 libseccomp && echo "0" || echo "1"), 0) | ||
ifeq ($(shell $(PKG_CONFIG) --atleast-version 2.5.0 libseccomp && grep -rq "seccomp_notif_sizes" /usr/include && echo "0"), 0) |
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.
this could be expensive, and detect the string in other unrelated header files.
What do you think about replacing it with printf "#include <linux/seccomp.h>\nvoid main(){struct seccomp_notif_sizes s;}" | cc -x c - -o /dev/null
?
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.
SGTM
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.
updated as suggested!
f1c02f7
to
147ac35
Compare
Signed-off-by: Peter Hunt <[email protected]>
147ac35
to
1d67d9e
Compare
Signed-off-by: Peter Hunt <[email protected]>
on older kernels we need to also check if the proper headers are installed, in addition to the seccomp version
also, unify the syntax of conditional compilation variables