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

Redefine asm_inline for Linux 5.4+, Fixes #2546 #2547

Merged
merged 1 commit into from
Oct 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/cc/export/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ R"********(
#ifndef __BPF_HELPERS_H
#define __BPF_HELPERS_H

/* In Linux 5.4 asm_inline was introduced, but it's not supported by clang.
* Redefine it to just asm to enable successful compilation.
*/
#ifdef asm_inline
#undef asm_inline
#define asm_inline asm
#endif

/* Before bpf_helpers.h is included, uapi bpf.h has been
* included, which references linux/types.h. This may bring
* in asm_volatile_goto definition if permitted based on
Expand Down