mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-30 16:14:13 +00:00
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:
parent
bba9254172
commit
997e60d52a
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user