Skip to content

Commit 493ac1b

Browse files
committed
only include sys/random.h if it seems like it might have something useful (python#29057)
1 parent c9d4c60 commit 493ac1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/random.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# ifdef HAVE_LINUX_RANDOM_H
1010
# include <linux/random.h>
1111
# endif
12-
# ifdef HAVE_SYS_RANDOM_H
12+
# if defined(HAVE_SYS_RANDOM_H) && (defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY))
1313
# include <sys/random.h>
1414
# endif
1515
# if !defined(HAVE_GETRANDOM) && defined(HAVE_GETRANDOM_SYSCALL)

0 commit comments

Comments
 (0)