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

Collapse All | Expand All

(-)Makefile (-3 / +10 lines)
Lines 37-47 Link Here
37
		gnome-icon-theme-symbolic>=0:x11-themes/gnome-icon-theme-symbolic \
37
		gnome-icon-theme-symbolic>=0:x11-themes/gnome-icon-theme-symbolic \
38
		gnome-icon-theme>=0:misc/gnome-icon-theme
38
		gnome-icon-theme>=0:misc/gnome-icon-theme
39
39
40
PORTSCOUT=	limitw:1,even
41
42
USES=		compiler:c++11-lib cpe desktop-file-utils gettext gnome \
40
USES=		compiler:c++11-lib cpe desktop-file-utils gettext gnome \
43
		localbase:ldflags meson pkgconfig python:3.4+ shebangfix \
41
		localbase:ldflags meson pkgconfig python:3.4+ shebangfix \
44
		sqlite tar:xz xorg
42
		sqlite tar:xz xorg
43
44
PORTSCOUT=	limitw:1,even
45
45
CPE_VENDOR=	gnome
46
CPE_VENDOR=	gnome
46
USE_GNOME=	cairo gnomedesktop3 intlhack libwnck3 libxml2 libxslt
47
USE_GNOME=	cairo gnomedesktop3 intlhack libwnck3 libxml2 libxslt
47
USE_XORG=	x11
48
USE_XORG=	x11
Lines 56-59 Link Here
56
57
57
PLIST_SUB+=	EPHY_VERSION=${PORTVERSION:R}
58
PLIST_SUB+=	EPHY_VERSION=${PORTVERSION:R}
58
59
59
.include <bsd.port.mk>
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
66
.include <bsd.port.post.mk>
(-)files/extra-patch-lib_ephy-sync-utils.c (+27 lines)
Line 0 Link Here
1
11.x does not have getrandom(2) (or getentropy(3))
2
3
--- lib/ephy-sync-utils.c.orig	2020-10-04 22:15:55 UTC
4
+++ lib/ephy-sync-utils.c
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,13 @@ 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
+    else
24
+      g_error ("Failed to open /dev/urandom to generate randomness: %s", g_strerror (errno));
25
   } while (ret < (gssize)num_bytes && errno == EINTR);
26
 
27
   if (ret != (gssize)num_bytes)

Return to bug 250128