Closed cyqsimon closed 11 months ago
Hmm, kernel backports are a real bummer...
How about this (untested)?
#if __has_include(<linux/dma-buf.h>)
MODULE_IMPORT_NS(DMA_BUF);
#endif
Yep that does it! Verified to build on RHEL9 with your patch.
Okay, thank you for verifying! I'll create a PR for this, hoping that this method doesn't have any drawbacks. 😄
It seems like it's the same issue as #3. I can see that it's already patched in #6, but that patch only imports
DMA_BUF
on kernel version 5.16.0 or higher. I manually deleted the conditional checks and it compiled successfully.I guess what's happening here is that a Redhat backport causes its "5.14.0" kernels to behave similarly to 5.16.0+ kernels. So my question is, is there a better way to check whether importing
DMA_BUF
namespace is necessary than a hard-coded version comparison? Sorry for not being of much help; I'm not a C developer.