[openssh-commits] [openssh] 02/02: Check HAVE_MMAP too now that configure sets it.
git+noreply at mindrot.org
git+noreply at mindrot.org
Tue Oct 7 21:28:49 AEDT 2025
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit b937061fe4922caced7b91442b3233c0bd763492
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Tue Oct 7 21:10:33 2025 +1100
Check HAVE_MMAP too now that configure sets it.
---
openbsd-compat/arc4random.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/openbsd-compat/arc4random.h b/openbsd-compat/arc4random.h
index af2d5c172..8f6842874 100644
--- a/openbsd-compat/arc4random.h
+++ b/openbsd-compat/arc4random.h
@@ -65,7 +65,7 @@ _rs_forkdetect(void)
static inline int
_rs_allocate(struct _rs **rsp, struct _rsx **rsxp)
{
-#if defined(MAP_ANON) && defined(MAP_PRIVATE)
+#if defined(HAVE_MMAP) && defined(MAP_ANON) && defined(MAP_PRIVATE)
if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED)
return (-1);
@@ -84,7 +84,7 @@ _rs_allocate(struct _rs **rsp, struct _rsx **rsxp)
*rsp = NULL;
return (-1);
}
-#endif
+#endif /* HAVE_MMAP et al */
_ARC4_ATFORK(_rs_forkhandler);
return (0);
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list