]> git.ipfire.org Git - thirdparty/util-linux.git/blob - include/randutils.h
Merge branch 'lscpu-output-fix' of https://github.com/kerolasa/util-linux
[thirdparty/util-linux.git] / include / randutils.h
1 #ifndef UTIL_LINUX_RANDUTILS
2 #define UTIL_LINUX_RANDUTILS
3
4 #ifdef HAVE_SRANDOM
5 #define srand(x) srandom(x)
6 #define rand() random()
7 #endif
8
9 /* rand() based */
10 extern int rand_get_number(int low_n, int high_n);
11
12 /* /dev/urandom based with fallback to rand() */
13 extern int random_get_fd(void);
14 extern void random_get_bytes(void *buf, size_t nbytes);
15 extern const char *random_tell_source(void);
16
17 #endif