diff --git a/repos/dde_linux/src/lib/lx_emul/shadow/drivers/char/random.c b/repos/dde_linux/src/lib/lx_emul/shadow/drivers/char/random.c index a05e3e84cb..aa3e1a6513 100644 --- a/repos/dde_linux/src/lib/lx_emul/shadow/drivers/char/random.c +++ b/repos/dde_linux/src/lib/lx_emul/shadow/drivers/char/random.c @@ -16,6 +16,7 @@ #include #include +#include void add_input_randomness(unsigned int type,unsigned int code,unsigned int value) @@ -45,8 +46,11 @@ int __must_check get_random_bytes_arch(void *buf, int nbytes) return nbytes; } - +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0) +void get_random_bytes(void *buf, int nbytes) +#else void get_random_bytes(void *buf, size_t nbytes) +#endif { nbytes = get_random_bytes_arch(buf, nbytes); }