Merge remote-tracking branch 'tor-github/pr/1049' into maint-0.4.0

This commit is contained in:
teor 2019-08-12 09:55:29 +10:00
commit a1d8409ee2
No known key found for this signature in database
GPG Key ID: 10FEAA0E7075672A
2 changed files with 8 additions and 0 deletions

4
changes/bug30614 Normal file
View File

@ -0,0 +1,4 @@
o Minor bugfixes (NetBSD):
- Fix usage of minherit() on NetBSD and other platforms that define
MAP_INHERIT_{ZERO,NONE} instead of INHERIT_{ZERO,NONE}. Fixes bug
30614; bugfix on 0.4.0.2-alpha. Patch from Taylor Campbell.

View File

@ -50,11 +50,15 @@
#ifdef INHERIT_ZERO
#define FLAG_ZERO INHERIT_ZERO
#elif defined(MAP_INHERIT_ZERO)
#define FLAG_ZERO MAP_INHERIT_ZERO
#endif
#ifdef INHERIT_NONE
#define FLAG_NOINHERIT INHERIT_NONE
#elif defined(VM_INHERIT_NONE)
#define FLAG_NOINHERIT VM_INHERIT_NONE
#elif defined(MAP_INHERIT_NONE)
#define FLAG_NOINHERIT MAP_INHERIT_NONE
#endif
#elif defined(HAVE_MADVISE)