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.
This commit is contained in:
Diego Elio 'Flameeyes' Pettenò 2009-05-15 23:09:59 +02:00
parent 0de6877934
commit d45c909ab3

View file

@ -26,6 +26,11 @@
#include <signal.h> #include <signal.h>
#include <sys/mman.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 <pulse/xmalloc.h>
#include <pulsecore/core-util.h> #include <pulsecore/core-util.h>