FreeBSD Bugzilla – Attachment 218542 Details for
Bug 250128
www/epiphany: build error (no getrandom(2) on 11.x)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[patch] add alternate implementation for missing getrandom(2) on 11.x (v2)
pr-epiphany-fix-11.x-getrandom.diff (text/plain), 2.11 KB, created by
John Hein
on 2020-10-05 14:47:17 UTC
(
hide
)
Description:
[patch] add alternate implementation for missing getrandom(2) on 11.x (v2)
Filename:
MIME Type:
Creator:
John Hein
Created:
2020-10-05 14:47:17 UTC
Size:
2.11 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 551382) >+++ Makefile (working copy) >@@ -37,11 +37,12 @@ > gnome-icon-theme-symbolic>=0:x11-themes/gnome-icon-theme-symbolic \ > gnome-icon-theme>=0:misc/gnome-icon-theme > >-PORTSCOUT= limitw:1,even >- > USES= compiler:c++11-lib cpe desktop-file-utils gettext gnome \ > localbase:ldflags meson pkgconfig python:3.4+ shebangfix \ > sqlite tar:xz xorg >+ >+PORTSCOUT= limitw:1,even >+ > CPE_VENDOR= gnome > USE_GNOME= cairo gnomedesktop3 intlhack libwnck3 libxml2 libxslt > USE_XORG= x11 >@@ -56,4 +57,10 @@ > > PLIST_SUB+= EPHY_VERSION=${PORTVERSION:R} > >-.include <bsd.port.mk> >+.include <bsd.port.pre.mk> >+ >+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200000 >+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-lib_ephy-sync-utils.c >+.endif >+ >+.include <bsd.port.post.mk> >Index: files/extra-patch-lib_ephy-sync-utils.c >=================================================================== >--- files/extra-patch-lib_ephy-sync-utils.c (nonexistent) >+++ files/extra-patch-lib_ephy-sync-utils.c (working copy) >@@ -0,0 +1,25 @@ >+11.x does not have getrandom(2) (or getentropy(3)) >+ >+--- lib/ephy-sync-utils.c.orig 2020-10-04 22:15:55 UTC >++++ lib/ephy-sync-utils.c >+@@ -24,6 +24,7 @@ >+ #include "ephy-settings.h" >+ >+ #include <errno.h> >++#include <fcntl.h> >+ #include <glib/gi18n.h> >+ #include <inttypes.h> >+ #include <json-glib/json-glib.h> >+@@ -189,7 +190,11 @@ ephy_sync_utils_generate_random_bytes (v >+ } >+ #else >+ do { >+- ret = getrandom (out, num_bytes, 0); >++ int fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC); >++ if (fd != -1) { >++ ret = read(fd, out, num_bytes); >++ (void)close(fd); >++ } >+ } while (ret < (gssize)num_bytes && errno == EINTR); >+ >+ if (ret != (gssize)num_bytes) > >Property changes on: files/extra-patch-lib_ephy-sync-utils.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 250128
:
218527
|
218542
|
218549