Commit cedcc5f7 authored by reimar's avatar reimar

fix for MAP_ANON vs. MAP_ANONYMOUS fix...


git-svn-id: file:///var/local/repositories/mplayer/trunk/postproc@14762 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 81947996
...@@ -64,6 +64,9 @@ untested special converters ...@@ -64,6 +64,9 @@ untested special converters
#endif #endif
#ifdef HAVE_SYS_MMAN_H #ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h> #include <sys/mman.h>
#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
#define MAP_ANONYMOUS MAP_ANON
#endif
#endif #endif
#include "swscale.h" #include "swscale.h"
#include "swscale_internal.h" #include "swscale_internal.h"
...@@ -2070,7 +2073,7 @@ SwsContext *sws_getContext(int srcW, int srcH, int origSrcFormat, int dstW, int ...@@ -2070,7 +2073,7 @@ SwsContext *sws_getContext(int srcW, int srcH, int origSrcFormat, int dstW, int
if(c->canMMX2BeUsed && (flags & SWS_FAST_BILINEAR)) if(c->canMMX2BeUsed && (flags & SWS_FAST_BILINEAR))
{ {
#define MAX_FUNNY_CODE_SIZE 10000 #define MAX_FUNNY_CODE_SIZE 10000
#ifdef HAVE_SYS_MMAN_H #ifdef MAP_ANONYMOUS
c->funnyYCode = (uint8_t*)mmap(NULL, MAX_FUNNY_CODE_SIZE, PROT_EXEC | PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); c->funnyYCode = (uint8_t*)mmap(NULL, MAX_FUNNY_CODE_SIZE, PROT_EXEC | PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
c->funnyUVCode = (uint8_t*)mmap(NULL, MAX_FUNNY_CODE_SIZE, PROT_EXEC | PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); c->funnyUVCode = (uint8_t*)mmap(NULL, MAX_FUNNY_CODE_SIZE, PROT_EXEC | PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment