Skip to content

Commit 2b8f83f

Browse files
committed
Fixes for getrandom detection
1 parent d3de630 commit 2b8f83f

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

configure.ac

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ AC_ARG_ENABLE([linuxkm-defaults],
139139
)
140140

141141

142-
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stddef.h time.h sys/ioctl.h sys/socket.h sys/time.h errno.h sys/un.h ctype.h])
142+
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stddef.h time.h sys/ioctl.h sys/socket.h sys/time.h errno.h sys/un.h ctype.h sys/random.h])
143143
AC_CHECK_LIB([network],[socket])
144144
AC_C_BIGENDIAN
145145
AC_C___ATOMIC
@@ -186,6 +186,9 @@ fi
186186
#ifdef HAVE_CTYPE_H
187187
#include <ctype.h>
188188
#endif
189+
#ifdef HAVE_SYS_RANDOM_H
190+
#include <sys/random.h>
191+
#endif
189192
]])
190193

191194
AC_PROG_INSTALL

wolfcrypt/src/random.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4256,6 +4256,8 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
42564256
}
42574257
close(os->fd);
42584258
#else
4259+
(void)output;
4260+
(void)sz;
42594261
ret = NOT_COMPILED_IN;
42604262
#endif /* NO_FILESYSTEM */
42614263

0 commit comments

Comments
 (0)