Warning: That file was not part of the compilation database. It may have many parsing errors.
| 1 | /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ |
|---|---|
| 2 | /* |
| 3 | * random definitions for NOLIBC |
| 4 | * Copyright (C) 2025 Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
| 5 | */ |
| 6 | |
| 7 | /* make sure to include all global symbols */ |
| 8 | #include "../nolibc.h" |
| 9 | |
| 10 | #ifndef _NOLIBC_SYS_RANDOM_H |
| 11 | #define _NOLIBC_SYS_RANDOM_H |
| 12 | |
| 13 | #include "../arch.h" |
| 14 | #include "../sys.h" |
| 15 | |
| 16 | #include <linux/random.h> |
| 17 | |
| 18 | /* |
| 19 | * ssize_t getrandom(void *buf, size_t buflen, unsigned int flags); |
| 20 | */ |
| 21 | |
| 22 | static __attribute__((unused)) |
| 23 | ssize_t sys_getrandom(void *buf, size_t buflen, unsigned int flags) |
| 24 | { |
| 25 | return my_syscall3(__NR_getrandom, buf, buflen, flags); |
| 26 | } |
| 27 | |
| 28 | static __attribute__((unused)) |
| 29 | ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) |
| 30 | { |
| 31 | return __sysret(sys_getrandom(buf, buflen, flags)); |
| 32 | } |
| 33 | |
| 34 | #endif /* _NOLIBC_SYS_RANDOM_H */ |
| 35 |
Warning: That file was not part of the compilation database. It may have many parsing errors.
