diff options
author | Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2009-05-15 23:09:59 +0200 |
---|---|---|
committer | Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2009-05-15 23:09:59 +0200 |
commit | d45c909ab37630c772c1852082cee90086e70b03 (patch) | |
tree | da6717d3519250bdbb6ec0307354282629ab1ddb /src/pulsecore/memtrap.c | |
parent | 0de6877934cd70874b7baa7e9ab416c43b7f9fc5 (diff) |
When MAP_ANONYMOUS is missing, fallback to MAP_ANON.
While the latter is deprecated on modern systems like glibc-based ones,
FreeBSD (and probably others) still use it, so make sure it falls back if
the new one is missing.
Diffstat (limited to 'src/pulsecore/memtrap.c')
-rw-r--r-- | src/pulsecore/memtrap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pulsecore/memtrap.c b/src/pulsecore/memtrap.c index 601fef44..e06f60ca 100644 --- a/src/pulsecore/memtrap.c +++ b/src/pulsecore/memtrap.c @@ -26,6 +26,11 @@ #include <signal.h> #include <sys/mman.h> +/* This is deprecated on glibc but is still used by FreeBSD */ +#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) +# define MAP_ANONYMOUS MAP_ANON +#endif + #include <pulse/xmalloc.h> #include <pulsecore/core-util.h> |