We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3376528 + df444b7 commit e35da92Copy full SHA for e35da92
regression/cbmc-library/getrandom-01/main.c
@@ -1,8 +1,9 @@
1
-#ifdef __linux__
2
-# include <sys/random.h>
3
-
4
# include <assert.h>
5
+#if defined(__GLIBC__) && \
+ (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 25))
+# include <sys/random.h>
6
+
7
int main()
8
{
9
char zero_bytes[6] = {0};
src/ansi-c/library/random.c
@@ -1,6 +1,12 @@
/* FUNCTION: getrandom */
+#ifndef __CPROVER_ERRNO_H_INCLUDED
+#include <errno.h>
+#define __CPROVER_ERRNO_H_INCLUDED
+#endif
10
11
# ifndef __CPROVER_SYS_RANDOM_H_INCLUDED
12
# include <sys/random.h>
0 commit comments