aliyun / plugsched

Live upgrade Linux kernel scheduler subsystem
BSD 3-Clause "New" or "Revised" License
82 stars 23 forks source link

deal with headers with the same file name #142

Open dtcccc opened 2 years ago

dtcccc commented 2 years ago

We may want to include some headers to boundary mod_files with the same name.

e.g., include/linux/bpf.h and include/uapi/linux/bpf.h kernel/trace/bpf_trace.h and include/linux/bpf_trace.h

and they will conflict in mod/ folder. How to deal with these kind of problems?

dtcccc commented 2 years ago

Could we mikdir mod/include so that the header files under include/ can appear in mod/include/linux/xxx.h (or mod/include/uapi/linux/xxx.h)

1) copy include/linux/bpf.h to mod/include/linux/bpf.h and replace #include<linux/bpf.h> with #include "include/linux/bpf.h" or 2) build soft link from include/linux/bpf.h to mod/include/linux/bpf.h, and no need to replace any code