blob: ba0f2b72208c269b34760f06c88214098d1d1dd5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--- a/include/random/sys/random.h (index)
+++ b/include/random/sys/random.h (working tree)
@@ -4,9 +4,9 @@
extern "C" {
#endif
-#define __NEED_size_t
-#define __NEED_ssize_t
-#include <bits/alltypes.h>
+#include <sys/types.h>
+
+#define SYS_getrandom 318
#define GRND_NONBLOCK 0x0001
#define GRND_RANDOM 0x0002
--- a/getrandom.c (index)
+++ b/getrandom.c (working tree)
@@ -3,5 +3,5 @@
ssize_t getrandom(void *buf, size_t buflen, unsigned flags)
{
- return syscall_cp(SYS_getrandom, buf, buflen, flags);
+ return syscall(SYS_getrandom, buf, buflen, flags);
}
|