diff options
author | Kevin Steves <stevesk@pobox.com> | 2002-04-07 17:08:53 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@pobox.com> | 2002-04-07 17:08:53 +0000 |
commit | 86b9fe6a77795fd5f086910912e7853fc1518afa (patch) | |
tree | b5ca35a265987fa2aa235ad126175e012a9eb0ef /monitor_mm.c | |
parent | c3c825575cdae3fd42ceb7709525fe8c0ad43f43 (diff) |
- (stevesk) HAVE_MMAP and HAVE_SYS_MMAN_H and use them in
monitor_mm.c
Diffstat (limited to 'monitor_mm.c')
-rw-r--r-- | monitor_mm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/monitor_mm.c b/monitor_mm.c index b383193c..b9ea978a 100644 --- a/monitor_mm.c +++ b/monitor_mm.c @@ -26,7 +26,9 @@ #include "includes.h" RCSID("$OpenBSD: monitor_mm.c,v 1.4 2002/03/25 20:12:10 stevesk Exp $"); +#ifdef HAVE_SYS_MMAN_H #include <sys/mman.h> +#endif #include "ssh.h" #include "xmalloc.h" @@ -82,10 +84,15 @@ mm_create(struct mm_master *mmalloc, size_t size) */ mm->mmalloc = mmalloc; +#ifdef HAVE_MMAP address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED, -1, 0); if (address == MAP_FAILED) fatal("mmap(%lu)", (u_long)size); +#else + fatal("%s: UsePrivilegeSeparation=yes not supported", + __FUNCTION__); +#endif mm->address = address; mm->size = size; |