mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
tweak to ensure we have anonymous memory if we are using mmap
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26739 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1cc66c3501
commit
7e82f60a9e
1 changed files with 10 additions and 3 deletions
|
@ -43,6 +43,16 @@
|
|||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_MMAP)
|
||||
# if !defined(MAP_ANONYMOUS)
|
||||
# if defined(MAP_ANON)
|
||||
# define MAP_ANONYMOUS MAP_ANON
|
||||
# else
|
||||
# undef HAVE_MMAP
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@interface NSInvocation (Private)
|
||||
/* Tell the invocation to store return values locally rather than writing
|
||||
* themto the stack location specified when the invocation was produced
|
||||
|
@ -80,9 +90,6 @@
|
|||
- (id) initWithSize: (unsigned)_size
|
||||
{
|
||||
#if defined(HAVE_MMAP)
|
||||
#ifndef MAP_ANONYMOUS
|
||||
#define MAP_ANONYMOUS MAP_ANON
|
||||
#endif
|
||||
#if defined(HAVE_MPROTECT)
|
||||
/* We have mprotect, so we create memory as writable and change it to
|
||||
* executable later (writable and executable may not be possible at
|
||||
|
|
Loading…
Reference in a new issue