diff options
author | Etienne CHAMPETIER <champetier.etienne@gmail.com> | 2016-06-09 13:03:00 +0000 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-06-08 00:19:24 +0200 |
commit | fdda69207d1509e0383e3da549f71666b194c40a (patch) | |
tree | 5f7ab6863fe9ea8a9729a535129cbb970d8b80c1 /CMakeLists.txt | |
parent | fd4bb41ee7ab136d25609c2a917beea5d52b723b (diff) | |
download | ubox-fdda69207d1509e0383e3da549f71666b194c40a.tar.gz |
getrandom: add helper for getrandom() syscall
getrandom() was introduced in version 3.17 of the Linux kernel.
By default getrandom() block until /dev/urandom pool has been initialized
and then read from it.
Read buffer is 256 bytes so getrandom() calls always succeed.
First usage will be to save a seed for /dev/urandom.
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 834b5b6..73e8753 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,11 @@ IF(DEBUG) ADD_DEFINITIONS(-DDEBUG -g3) ENDIF() +ADD_EXECUTABLE(getrandom getrandom.c) +INSTALL(TARGETS getrandom + RUNTIME DESTINATION bin +) + ADD_EXECUTABLE(kmodloader kmodloader.c) TARGET_LINK_LIBRARIES(kmodloader ubox) |