![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /usr/src/kernels/4.18.0-348.2.1.el8_5.x86_64/include/drm-backport/ |
This directory is part of the DRM backport for RHEL, and contains compatibility shims for various kernel headers so that upstream DRM code needs minimal modifications in order to compile against the rest of the kernel infrastructure for RHEL. These shims are generally wrappers around various portions of the kernel API that have changed upstream but not downstream. How to add compatibility headers Let's say we want to add a compatibility shim for linux/mm.h, that does something simple like: ... #define totalram_pages() totalram_pages ... We would simply add a header file in include/rm-backport/linux/mm.h that looks like this: #ifndef _RH_DRM_BACKPORT_LINUX_MM_H #define _RH_DRM_BACKPORT_LINUX_MM_H /* Note the use of #include_next instead of #include, this forces * GCC to look for <linux/mm.h> in header directories which come -AFTER- * the directory which this header was found in. */ #include_next <linux/mm.h> /* So we keep things unchanged for users outside of the DRM * backport */ #ifdef RH_DRM_BACKPORT /* Finally, the actual shim code */ #define totalram_pages() totalram_pages #endif #endif And we're done :)