]> git.ipfire.org Git - thirdparty/util-linux.git/blame - include/randutils.h
include: add missing license lines
[thirdparty/util-linux.git] / include / randutils.h
CommitLineData
faeb1b64
KZ
1/*
2 * SPDX-License-Identifier: BSD-3-Clause
3 */
fe72459e
DB
4#ifndef UTIL_LINUX_RANDUTILS
5#define UTIL_LINUX_RANDUTILS
6
7#ifdef HAVE_SRANDOM
8#define srand(x) srandom(x)
9#define rand() random()
10#endif
11
a55d646b 12/* rand() based */
a55d646b
KZ
13extern int rand_get_number(int low_n, int high_n);
14
15/* /dev/urandom based with fallback to rand() */
fe72459e 16extern int random_get_fd(void);
e4be3ee0 17extern int ul_random_get_bytes(void *buf, size_t nbytes);
0720d60c 18extern const char *random_tell_source(void);
fe72459e
DB
19
20#endif