summaryrefslogtreecommitdiffstats
path: root/include/c/rand/rand/rand.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/c/rand/rand/rand.h')
-rw-r--r--include/c/rand/rand/rand.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/c/rand/rand/rand.h b/include/c/rand/rand/rand.h
new file mode 100644
index 0000000..341867e
--- /dev/null
+++ b/include/c/rand/rand/rand.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_RAND_H_
+#define INCLUDE_C_RAND_RAND_RAND_H_
+
+
+#include <stdlib.h>
+
+
+#pragma clang assume_nonnull begin
+inline int c_rand(void);
+
+
+inline int
+c_rand(void)
+{
+ return rand();
+}
+#pragma clang assume_nonnull end
+
+
+#endif // Header guard