--- lib/ephy-sync-utils.c.orig	2022-01-15 12:10:56.000000000 -0800
+++ lib/ephy-sync-utils.c	2022-01-15 12:18:32.000000000 -0800
@@ -23,14 +23,12 @@
 
 #include "ephy-settings.h"
 
-#include <errno.h>
 #include <glib/gi18n.h>
 #include <inttypes.h>
 #include <json-glib/json-glib.h>
 #include <libsoup/soup.h>
 #include <stdio.h>
 #include <string.h>
-#include <sys/random.h>
 
 static const char hex_digits[] = "0123456789abcdef";
 
@@ -167,24 +165,21 @@
  * This is mainly required by Nettle's RSA support.
  * From Nettle's documentation: random_ctx and random is a randomness generator.
  * random(random_ctx, length, dst) should generate length random octets and store them at dst.
- * We don't use random_ctx.
+ * We don't really use random_ctx, since we have /dev/urandom available.
  */
 void
 ephy_sync_utils_generate_random_bytes (void   *random_ctx,
                                        gsize   num_bytes,
                                        guint8 *out)
 {
-  gssize ret;
+  FILE *fp;
 
   g_assert (num_bytes > 0);
   g_assert (out);
 
-  do {
-    ret = getrandom (out, num_bytes, 0);
-  } while (ret < (gssize)num_bytes && errno == EINTR);
-
-  if (ret != (gssize)num_bytes)
-    g_error ("Failed to generate randomness: %s", g_strerror (errno));
+  fp = fopen ("/dev/urandom", "r");
+  fread (out, sizeof (guint8), num_bytes, fp);
+  fclose (fp);
 }
 
 char *
