ldd3 icon indicating copy to clipboard operation
ldd3 copied to clipboard

Build failure with kernel versions < 5.17 due to usage of pde_data()

Open graudtv opened this issue 2 years ago • 1 comments

#78 replaced usages of PDE_DATA() with pde_data(), and now the examples fail to build with kernels before 5.17:

.../ldd3/misc-modules/jit.c:96:40: error: implicit declaration of function ‘pde_data’ [-Werror=implicit-function-declaration]
   96 |  return single_open(file, jit_fn_show, pde_data(inode));

Maybe some wrapper should be added to handle this depending on kernel version? I think it would be a good idea to not drop support for not the newest, but still recent and widely used kernels

graudtv avatar Feb 23 '23 13:02 graudtv

@graudtv please feel free to send a PR if you like. You should use KERNEL_VERSION to support previous kernels, a search of this macro will show some example usage.

dwalkes avatar Mar 09 '23 02:03 dwalkes