fishinabarrel / linux-kernel-module-rust

Framework for writing Linux kernel modules in safe Rust
GNU General Public License v2.0
1.33k stars 119 forks source link

build.rs: Build fixes for Centos 7 #278

Open WowVeryLogin opened 3 years ago

WowVeryLogin commented 3 years ago

Hello. Our team is implementing kernel module on rust for developed device. But we need to support multiple Linux distributions (to be precise: CentOS 7/8, Ubuntu 18/20, Debian 10). The problem is that CentOS 7 has really old kernel version as default that can not be compiled by clang (thus parsed by libclang in bindgen) as is. This patch allows to build Hello-World on CentOS 7 with old kernel.