CentOS Stream release 9:
linux/uio_mrf.c:129:19: error: assignment of read-only member ‘vm_flags’
129 | vma->vm_flags |= VM_IO | VM_RESERVED;
It seems that Centos Stream
backports the vm_flags_set()
wrapper for old kernel versions, so older than KERNEL_VERSION(6, 3, 0)
. But, AlmaLinux and Rocky Linux
don’t.
How can I distinguish Centos Stream
from AlmaLinux and Rocky Linux
so I can write a compatible kernel driver for all? As far as I can see, all three distros use the same macros e.g.
#define LINUX_VERSION_CODE 331264
#define LINUX_VERSION_MAJOR 5
#define LINUX_VERSION_PATCHLEVEL 14
#define LINUX_VERSION_SUBLEVEL 0
#define RHEL_MAJOR 9
#define RHEL_MINOR 6
#define RHEL_RELEASE_CODE 2310
#define RHEL_RELEASE "522"
Is there any macro specific to Centos Stream
only?