gst/cothreads.c: Add another fallback if MAP_ANONYMOUS is missing (#132991)

Original commit message from CVS:
* gst/cothreads.c: Add another fallback if MAP_ANONYMOUS is
missing (#132991)
This commit is contained in:
David Schleef 2004-01-30 21:26:15 +00:00
parent 192330d37a
commit 1f24aab8be
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2004-01-30 David Schleef <ds@schleef.org>
* gst/cothreads.c: Add another fallback if MAP_ANONYMOUS is
missing (#132991)
2004-01-30 Laurent Vivier <Laurent.Vivier@bull.net>
reviewed by Benjamin Otte

View file

@ -42,9 +42,14 @@
#include <ucontext.h>
#endif
/* older glibc's have MAP_ANON instead of MAP_ANONYMOUS */
#ifndef MAP_ANONYMOUS
#ifdef MAP_ANON
/* older glibc's have MAP_ANON instead of MAP_ANONYMOUS */
#define MAP_ANONYMOUS MAP_ANON
#else
/* make due without. If this fails, we need to open and map /dev/zero */
#define MAP_ANONYMOUS 0
#endif
#endif
#define STACK_SIZE 0x200000