|File: [cvs.NetBSD.org] / pkgsrc / x11 / libXdmcp / patches / Attic / patch-Key.c (download)
Revision 1.3, Wed Feb 23 03:10:26 2022 UTC (21 months, 2 weeks ago) by gutteridge
Changes since 1.2: +9 -8
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).
$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
@@ -82,6 +82,11 @@ arc4random_buf (void *auth, int len)
/* weak emulation of arc4random through the getentropy libc call */
ret = getentropy (auth, len);
if (ret == 0)