1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
Subject: [PATCH] ldso: Define MAP_FAILED for _dl_mmap()
When using mmap2() to emulate mmap(), _dl_mmap() uses MAP_FAILED to
indicate failure. MAP_FAILED is not defined anywhere, so this patch
defines it.
---
ldso/include/dl-syscall.h | 1 +
1 file changed, 1 insertion(+)
Index: uClibc-0.9.28/ldso/include/dl-syscall.h
===================================================================
--- uClibc-0.9.28.orig/ldso/include/dl-syscall.h 2006-02-07 16:49:27.000000000 +0100
+++ uClibc-0.9.28/ldso/include/dl-syscall.h 2006-02-07 17:07:06.000000000 +0100
@@ -132,6 +132,7 @@ static inline _syscall6(__ptr_t, __sysca
size_t, len, int, prot, int, flags, int, fd, off_t, offset);
/*always 12, even on architectures where PAGE_SHIFT != 12 */
#define MMAP2_PAGE_SHIFT 12
+#define MAP_FAILED ((void *) -1)
static inline void * _dl_mmap(void * addr, unsigned long size, int prot,
int flags, int fd, unsigned long offset)
{
|