--- Python/random.c.t	2021-10-21 19:51:50.000000000 -0700
+++ Python/random.c	2021-10-21 19:52:01.000000000 -0700
@@ -71,6 +71,7 @@
  * Solaris 11.3), it is blocking whereas os.urandom() should not block. */
 #elif defined(HAVE_GETENTROPY) && !defined(sun)
 #define PY_GETENTROPY 1
+#include <sys/random.h>
 
 /* Fill buffer with size pseudo-random bytes generated by getentropy().
    Return 0 on success, or raise an exception and return -1 on error.