Skip to content

Commit b563b01

Browse files
committed
review comments
1 parent c333508 commit b563b01

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Modules/posixmodule.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@
148148
# include <sys/sysctl.h>
149149
#endif
150150

151-
#ifdef HAVE_SYS_RANDOM_H
152-
# include <sys/random.h> // GRND_RANDOM on FreeBSD and NetBSD
153-
#endif
154151
#ifdef HAVE_LINUX_RANDOM_H
155-
# include <linux/random.h> // GRND_RANDOM
152+
# include <linux/random.h> // GRND_RANDOM
156153
#endif
157-
#ifdef HAVE_GETRANDOM_SYSCALL
158-
# include <sys/syscall.h> // syscall()
154+
#if defined(HAVE_SYS_RANDOM_H) && (defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY))
155+
# include <sys/random.h> // getrandom(), GRND_NONBLOCK on FreeBSD and NetBSD
156+
#endif
157+
#if !defined(HAVE_GETRANDOM) && defined(HAVE_GETRANDOM_SYSCALL)
158+
# include <sys/syscall.h> // SYS_getrandom
159159
#endif
160160

161161
#ifdef HAVE_POSIX_SPAWN

0 commit comments

Comments
 (0)