From: Darren Tucker Date: Tue, 7 Oct 2025 10:10:33 +0000 (+1100) Subject: Check HAVE_MMAP too now that configure sets it. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;ds=inline;p=thirdparty%2Fopenssh-portable.git Check HAVE_MMAP too now that configure sets it. --- 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);