summaryrefslogtreecommitdiffstats
path: root/src/basic/missing_random.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-12-06 06:47:47 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-12-06 13:26:55 +0100
commitb19bb11142214b68ba8c5a367fe97117a2f33e94 (patch)
tree11112138a6d643463b8c5a6f5873cf8510a06140 /src/basic/missing_random.h
parentmissing: drop TIOCVHANGUP (diff)
downloadsystemd-b19bb11142214b68ba8c5a367fe97117a2f33e94.tar.xz
systemd-b19bb11142214b68ba8c5a367fe97117a2f33e94.zip
missing: move rand related definitions to missing_random.h
Diffstat (limited to 'src/basic/missing_random.h')
-rw-r--r--src/basic/missing_random.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/basic/missing_random.h b/src/basic/missing_random.h
new file mode 100644
index 0000000000..2e76031b32
--- /dev/null
+++ b/src/basic/missing_random.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
+#pragma once
+
+#if USE_SYS_RANDOM_H
+# include <sys/random.h>
+#else
+# include <linux/random.h>
+#endif
+
+#ifndef GRND_NONBLOCK
+#define GRND_NONBLOCK 0x0001
+#endif
+
+#ifndef GRND_RANDOM
+#define GRND_RANDOM 0x0002
+#endif