chiark / gitweb /
tests: add tests for environment serialization
[elogind.git] / src / basic / random-util.c
index 2f468db770d6d24fd8fa838dc8aa5a195f34d5b1..b216be579d28c0fe2d250b263dfe0f49de2ef5fb 100644 (file)
 #include <stdint.h>
 
 #ifdef HAVE_SYS_AUXV_H
-#include <sys/auxv.h>
+#  include <sys/auxv.h>
+#endif
+
+#ifdef USE_SYS_RANDOM_H
+#  include <sys/random.h>
+#else
+#  include <linux/random.h>
 #endif
 
 #include "fd-util.h"
@@ -46,7 +52,7 @@ int dev_urandom(void *p, size_t n) {
          * never block, and will always return some data from the
          * kernel, regardless if the random pool is fully initialized
          * or not. It thus makes no guarantee for the quality of the
-         * returned entropy, but is good enough for or usual usecases
+         * returned entropy, but is good enough for our usual usecases
          * of seeding the hash functions for hashtable */
 
         /* Use the getrandom() syscall unless we know we don't have