summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorgutteridge <gutteridge@pkgsrc.org>2022-02-23 03:10:26 +0000
committergutteridge <gutteridge@pkgsrc.org>2022-02-23 03:10:26 +0000
commit717eb72040bd8ba23276f8a9aa09ec34ad5e6369 (patch)
tree315c00688eef109ceb656c326b8f61c6cc125f48 /x11
parent1fd293adee7100b9825d4a2c9e47b391d2829344 (diff)
downloadpkgsrc-717eb72040bd8ba23276f8a9aa09ec34ad5e6369.tar.gz
libXdmcp: fix builds with Solaris 11.3
There are circumstances where getentropy() exists but arc4random_buf() does not, as reported to be the case with Solaris 11.3 in PR pkg/54628, report and analysis by Sad Clouds. sys/random.h only needs to be included on SunOS, in that case (second patch iteration).
Diffstat (limited to 'x11')
-rw-r--r--x11/libXdmcp/distinfo3
-rw-r--r--x11/libXdmcp/patches/patch-Key.c19
2 files changed, 21 insertions, 1 deletions
diff --git a/x11/libXdmcp/distinfo b/x11/libXdmcp/distinfo
index 852793ffc19..2ce95097f85 100644
--- a/x11/libXdmcp/distinfo
+++ b/x11/libXdmcp/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.12 2022/01/14 16:13:53 gutteridge Exp $
+$NetBSD: distinfo,v 1.13 2022/02/23 03:10:26 gutteridge Exp $
BLAKE2s (libXdmcp-1.1.3.tar.bz2) = a830d9b0484d17db15080be824ba9f9819ea08c56fe07670c2bd2e17fafc2386
SHA512 (libXdmcp-1.1.3.tar.bz2) = cb1d4650f97d66e73acd2465ec7d757b9b797cce2f85e301860a44997a461837eea845ec9bd5b639ec5ca34c804f8bdd870697a5ce3f4e270b687c9ef74f25ec
Size (libXdmcp-1.1.3.tar.bz2) = 332795 bytes
+SHA1 (patch-Key.c) = 1a065472f34d4d8453efce44263bd6d66a7c4d86
diff --git a/x11/libXdmcp/patches/patch-Key.c b/x11/libXdmcp/patches/patch-Key.c
new file mode 100644
index 00000000000..733816fdbd9
--- /dev/null
+++ b/x11/libXdmcp/patches/patch-Key.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-Key.c,v 1.3 2022/02/23 03:10:26 gutteridge Exp $
+
+Fix builds where getentropy() exists but arc4random_buf() does not, as
+reported to be the case with Solaris 11.3 in PR pkg/54628.
+
+--- Key.c.orig 2019-03-16 16:21:22.000000000 +0000
++++ Key.c
+@@ -82,6 +82,11 @@ arc4random_buf (void *auth, int len)
+ int ret;
+
+ #if HAVE_GETENTROPY
++
++#ifdef __sun
++#include <sys/random.h>
++#endif
++
+ /* weak emulation of arc4random through the getentropy libc call */
+ ret = getentropy (auth, len);
+ if (ret == 0)