Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions regression/cbmc-library/getrandom-01/main.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#ifdef __linux__
# include <sys/random.h>

# include <assert.h>

#if defined(__GLIBC__) && \
(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 25))
# include <sys/random.h>

int main()
{
char zero_bytes[6] = {0};
Expand Down
8 changes: 7 additions & 1 deletion src/ansi-c/library/random.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
/* FUNCTION: getrandom */

#ifdef __linux__
#ifndef __CPROVER_ERRNO_H_INCLUDED
#include <errno.h>
#define __CPROVER_ERRNO_H_INCLUDED
#endif

#if defined(__GLIBC__) && \
(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 25))

# ifndef __CPROVER_SYS_RANDOM_H_INCLUDED
# include <sys/random.h>
Expand Down