diff options
Diffstat (limited to 'include/c/rand/rand/srand.h')
-rw-r--r-- | include/c/rand/rand/srand.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/c/rand/rand/srand.h b/include/c/rand/rand/srand.h new file mode 100644 index 0000000..2fbb193 --- /dev/null +++ b/include/c/rand/rand/srand.h @@ -0,0 +1,24 @@ +// Copyright 2022 Alejandro Colomar <alx@kernel.org> +// SPDX-License-Identifier: LGPL-3.0-or-later WITH LGPL-3.0-linking-exception + + +#ifndef INCLUDE_C_RAND_RAND_SRAND_H_ +#define INCLUDE_C_RAND_RAND_SRAND_H_ + + +#include <stdlib.h> + + +#pragma clang assume_nonnull begin +inline void c_srand(unsigned int seed); + + +inline void +c_srand(unsigned int seed) +{ + srand(seed); +} +#pragma clang assume_nonnull end + + +#endif // Header guard |