View | Details | Raw Unified | Return to bug 250128 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (+7 lines)
Lines 56-59 Link Here
56
56
57
PLIST_SUB+=	EPHY_VERSION=${PORTVERSION:R}
57
PLIST_SUB+=	EPHY_VERSION=${PORTVERSION:R}
58
58
59
60
.include <bsd.port.pre.mk>
61
62
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200000
63
EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-lib_ephy-sync-utils.c
64
.endif
65
59
.include <bsd.port.mk>
66
.include <bsd.port.mk>
(-)files/extra-patch-lib_ephy-sync-utils.c (+25 lines)
Line 0 Link Here
1
11.x does not have getrandom(2) (or getentropy(3))
2
3
--- work/epiphany-3.38.0/lib/ephy-sync-utils.c.1	2020-10-04 16:15:55.103981000 -0600
4
+++ work/epiphany-3.38.0/lib/ephy-sync-utils.c	2020-10-04 16:16:40.982162000 -0600
5
@@ -24,6 +24,7 @@
6
 #include "ephy-settings.h"
7
 
8
 #include <errno.h>
9
+#include <fcntl.h>
10
 #include <glib/gi18n.h>
11
 #include <inttypes.h>
12
 #include <json-glib/json-glib.h>
13
@@ -189,7 +190,11 @@ ephy_sync_utils_generate_random_bytes (v
14
   }
15
 #else
16
   do {
17
-    ret = getrandom (out, num_bytes, 0);
18
+    int fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC);
19
+    if (fd != -1) {
20
+      ret = read(fd, out, num_bytes);
21
+      (void)close(fd);
22
+    }
23
   } while (ret < (gssize)num_bytes && errno == EINTR);
24
 
25
   if (ret != (gssize)num_bytes)

Return to bug 250128