Ticket #514: ext_darwin.patch

File ext_darwin.patch, 686 bytes (added by stephane.lapie@…, 13 years ago)

Patch file for loader/ext.c. Replaces mmap() calls feeding on /dev/zero with mmap(MAP_ANON) calls for CONFIG_DARWIN case.

Line 
1236d235
2< #undef MAP_ANON
3251c250
4< #ifdef MAP_ANON
5---
6> #ifdef CONFIG_DARWIN
7253a253
8>       fd = -1;
9266c266
10< #endif  /* MAP_ANON */
11---
12> #endif  /* CONFIG_DARWIN */
13278a279
14> #ifndef CONFIG_DARWIN
15280a282,284
16> #else
17>     if ((ret = mmap( start, size_low, prot, MAP_PRIVATE | MAP_FIXED | MAP_ANON, fd, offset_low )) != (LPVOID)-1)
18> #endif /* CONFIG_DARWIN */
19473a478
20> #ifndef CONFIG_DARWIN
21478a484
22> #endif /* CONFIG_DARWIN */
23527a534
24> #ifndef CONFIG_DARWIN
25529a537,540
26> #else
27>     /* mmap feeding from fd from /dev/zero doesn't work on darwin ! */
28>     answer=mmap(address, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON, -1, 0);
29> #endif /* CONFIG_DARWIN */