Skip to content

Add workaround for 'bpf_task_work' on Linux 6.18#5453

Closed
ekyooo wants to merge 1 commit intoiovisor:masterfrom
ekyooo:libbpf_6.18
Closed

Add workaround for 'bpf_task_work' on Linux 6.18#5453
ekyooo wants to merge 1 commit intoiovisor:masterfrom
ekyooo:libbpf_6.18

Conversation

@ekyooo
Copy link
Copy Markdown
Collaborator

@ekyooo ekyooo commented Jan 30, 2026

Fix compilation errors caused by bpf_task_work being forward-declared in Linux 6.18. A placeholder definition is added to virtual_bpf.h for compatibility.

Related to libbpf commit f820b82.

Fix compilation errors caused by `bpf_task_work` being forward-declared in Linux 6.18.
A placeholder definition is added to `virtual_bpf.h` for compatibility.

Related to libbpf commit f820b82.
@arges
Copy link
Copy Markdown

arges commented Jan 30, 2026

It may be helpful to ifndef around the structure to ensure it doesn't get defined more than once. For example:

#ifndef __BPF_TASK_WORK_DEFINED__
#define __BPF_TASK_WORK_DEFINED__
struct bpf_task_work {
       __u64 __opaque;
} __attribute__((aligned(8)));
#endif

@ekyooo
Copy link
Copy Markdown
Collaborator Author

ekyooo commented Feb 10, 2026

It may be helpful to ifndef around the structure to ensure it doesn't get defined more than once. For example:

@arges
Thanks for the feedback. This PR has been superseded by the following one:
#5455

@ekyooo ekyooo closed this Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants