lx_emul: guard 6.1.x signature changes

Needed for drivers still implemented using Linux 5.x.x.

Issue #4813
This commit is contained in:
Josef Söntgen 2023-04-03 15:00:28 +02:00 committed by Norman Feske
parent bba9254172
commit 997e60d52a

View File

@ -16,6 +16,7 @@
#include <lx_emul/random.h> #include <lx_emul/random.h>
#include <linux/random.h> #include <linux/random.h>
#include <linux/version.h>
void add_input_randomness(unsigned int type,unsigned int code,unsigned int value) 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; 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) void get_random_bytes(void *buf, size_t nbytes)
#endif
{ {
nbytes = get_random_bytes_arch(buf, nbytes); nbytes = get_random_bytes_arch(buf, nbytes);
} }