The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / uclibc / 0.9.33.2 / 0040-mman-rename-MAP_UNINITIALIZE-to-MAP_UNINITIALIZED.patch
1 From fb1b8fc191bffd6b3bc6db6bfa824b2d41e18485 Mon Sep 17 00:00:00 2001
2 From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
3 Date: Tue, 5 Feb 2013 19:13:06 +0100
4 Subject: [PATCH] mman: rename MAP_UNINITIALIZE to MAP_UNINITIALIZED
5
6 The name was changed to include a trailing 'D' when it went into the
7 kernel.
8
9 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
10 ---
11  ldso/ldso/dl-elf.c                           |    2 +-
12  ldso/ldso/ldso.c                             |    2 +-
13  libc/stdlib/malloc-simple/alloc.c            |    4 ++--
14  libc/stdlib/malloc-standard/malloc.h         |    6 +++---
15  libc/stdlib/malloc/malloc.c                  |    2 +-
16  libc/sysdeps/linux/alpha/bits/mman.h         |    2 +-
17  libc/sysdeps/linux/common/bits/mman-common.h |    2 +-
18  libc/sysdeps/linux/hppa/bits/mman.h          |    2 +-
19  libc/sysdeps/linux/mips/bits/mman.h          |    2 +-
20  libc/sysdeps/linux/powerpc/bits/mman.h       |    2 +-
21  libc/sysdeps/linux/sparc/bits/mman.h         |    2 +-
22  libc/sysdeps/linux/xtensa/bits/mman.h        |    2 +-
23  12 files changed, 15 insertions(+), 15 deletions(-)
24
25 diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
26 index 9e2a12c..0e6d2cd 100644
27 --- a/ldso/ldso/dl-elf.c
28 +++ b/ldso/ldso/dl-elf.c
29 @@ -500,7 +500,7 @@ struct elf_resolve *_dl_load_elf_shared_library(unsigned rflags,
30                 return NULL;
31         }
32         header = _dl_mmap((void *) 0, _dl_pagesize, PROT_READ | PROT_WRITE,
33 -                       MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0);
34 +                       MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED, -1, 0);
35         if (_dl_mmap_check_error(header)) {
36                 _dl_dprintf(2, "%s:%i: can't map '%s'\n", _dl_progname, __LINE__, libname);
37                 _dl_internal_error_number = LD_ERROR_MMAP_FAILED;
38 diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
39 index 85d27a3..df46e24 100644
40 --- a/ldso/ldso/ldso.c
41 +++ b/ldso/ldso/ldso.c
42 @@ -245,7 +245,7 @@ void *_dl_malloc(size_t size)
43  
44                 _dl_debug_early("mmapping more memory\n");
45                 _dl_mmap_zero = _dl_malloc_addr = _dl_mmap((void *) 0, rounded_size,
46 -                               PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0);
47 +                               PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED, -1, 0);
48                 if (_dl_mmap_check_error(_dl_mmap_zero)) {
49                         _dl_dprintf(_dl_debug_file, "%s: mmap of a spare page failed!\n", _dl_progname);
50                         _dl_exit(20);
51 diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c
52 index 914c89d..ec49781 100644
53 --- a/libc/stdlib/malloc-simple/alloc.c
54 +++ b/libc/stdlib/malloc-simple/alloc.c
55 @@ -36,7 +36,7 @@ void *malloc(size_t size)
56  #ifdef __ARCH_USE_MMU__
57  # define MMAP_FLAGS MAP_PRIVATE | MAP_ANONYMOUS
58  #else
59 -# define MMAP_FLAGS MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZE
60 +# define MMAP_FLAGS MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZED
61  #endif
62  
63         result = mmap((void *) 0, size + sizeof(size_t), PROT_READ | PROT_WRITE,
64 @@ -63,7 +63,7 @@ void * calloc(size_t nmemb, size_t lsize)
65         result = malloc(size);
66  
67  #ifndef __ARCH_USE_MMU__
68 -       /* mmap'd with MAP_UNINITIALIZE, we have to blank memory ourselves */
69 +       /* mmap'd with MAP_UNINITIALIZED, we have to blank memory ourselves */
70         if (result != NULL) {
71                 memset(result, 0, size);
72         }
73 diff --git a/libc/stdlib/malloc-standard/malloc.h b/libc/stdlib/malloc-standard/malloc.h
74 index 73d4b12..e6ae544 100644
75 --- a/libc/stdlib/malloc-standard/malloc.h
76 +++ b/libc/stdlib/malloc-standard/malloc.h
77 @@ -349,13 +349,13 @@ __UCLIBC_MUTEX_EXTERN(__malloc_lock);
78  #endif
79  
80  #ifdef __ARCH_USE_MMU__
81 -# define _MAP_UNINITIALIZE 0
82 +# define _MAP_UNINITIALIZED 0
83  #else
84 -# define _MAP_UNINITIALIZE MAP_UNINITIALIZE
85 +# define _MAP_UNINITIALIZED MAP_UNINITIALIZED
86  #endif
87  
88  #define MMAP(addr, size, prot) \
89 - (mmap((addr), (size), (prot), MAP_PRIVATE|MAP_ANONYMOUS|_MAP_UNINITIALIZE, 0, 0))
90 + (mmap((addr), (size), (prot), MAP_PRIVATE|MAP_ANONYMOUS|_MAP_UNINITIALIZED, 0, 0))
91  
92  
93  /* -----------------------  Chunk representations ----------------------- */
94 diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c
95 index d58a7d0..2b47077 100644
96 --- a/libc/stdlib/malloc/malloc.c
97 +++ b/libc/stdlib/malloc/malloc.c
98 @@ -124,7 +124,7 @@ __malloc_from_heap (size_t size, struct heap_free_area **heap
99                     MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
100  #else
101        block = mmap ((void *)0, block_size, PROT_READ | PROT_WRITE,
102 -                   MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZE, 0, 0);
103 +                   MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZED, 0, 0);
104  #endif
105  
106  #endif /* MALLOC_USE_SBRK */
107 diff --git a/libc/sysdeps/linux/alpha/bits/mman.h b/libc/sysdeps/linux/alpha/bits/mman.h
108 index cafad4a..31327ed 100644
109 --- a/libc/sysdeps/linux/alpha/bits/mman.h
110 +++ b/libc/sysdeps/linux/alpha/bits/mman.h
111 @@ -71,7 +71,7 @@
112  # define MAP_NORESERVE   0x10000       /* Don't check for reservations.  */
113  # define MAP_POPULATE    0x20000       /* Populate (prefault) pagetables.  */
114  # define MAP_NONBLOCK    0x40000       /* Do not block on IO.  */
115 -# define MAP_UNINITIALIZE 0x4000000     /* For anonymous mmap, memory could
116 +# define MAP_UNINITIALIZED 0x4000000    /* For anonymous mmap, memory could
117                                            be uninitialized. */
118  #endif
119  
120 diff --git a/libc/sysdeps/linux/common/bits/mman-common.h b/libc/sysdeps/linux/common/bits/mman-common.h
121 index f00cb1a..c733a87 100644
122 --- a/libc/sysdeps/linux/common/bits/mman-common.h
123 +++ b/libc/sysdeps/linux/common/bits/mman-common.h
124 @@ -64,7 +64,7 @@
125  # define MAP_POPULATE  0x08000         /* Populate (prefault) pagetables.  */
126  # define MAP_NONBLOCK  0x10000         /* Do not block on IO.  */
127  # define MAP_STACK     0x20000         /* Allocation is for a stack.  */
128 -# define MAP_UNINITIALIZE 0x4000000     /* For anonymous mmap, memory could
129 +# define MAP_UNINITIALIZED 0x4000000    /* For anonymous mmap, memory could
130                                            be uninitialized. */
131  #endif
132  
133 diff --git a/libc/sysdeps/linux/hppa/bits/mman.h b/libc/sysdeps/linux/hppa/bits/mman.h
134 index 7f9bf4e..fc73c91 100644
135 --- a/libc/sysdeps/linux/hppa/bits/mman.h
136 +++ b/libc/sysdeps/linux/hppa/bits/mman.h
137 @@ -45,7 +45,7 @@
138  #define MAP_GROWSDOWN  0x8000          /* stack-like segment */
139  #define MAP_POPULATE   0x10000         /* populate (prefault) pagetables */
140  #define MAP_NONBLOCK   0x20000         /* do not block on IO */
141 -#define MAP_UNINITIALIZE 0x4000000     /* For anonymous mmap, memory could
142 +#define MAP_UNINITIALIZED 0x4000000     /* For anonymous mmap, memory could
143                                           be uninitialized. */
144  
145  #define MS_SYNC                1               /* synchronous memory sync */
146 diff --git a/libc/sysdeps/linux/mips/bits/mman.h b/libc/sysdeps/linux/mips/bits/mman.h
147 index c480be4..f9a8128 100644
148 --- a/libc/sysdeps/linux/mips/bits/mman.h
149 +++ b/libc/sysdeps/linux/mips/bits/mman.h
150 @@ -66,7 +66,7 @@
151  # define MAP_LOCKED    0x8000          /* pages are locked */
152  # define MAP_POPULATE   0x10000         /* populate (prefault) pagetables */
153  # define MAP_NONBLOCK   0x20000         /* do not block on IO */
154 -# define MAP_UNINITIALIZE 0x4000000     /* For anonymous mmap, memory could
155 +# define MAP_UNINITIALIZED 0x4000000    /* For anonymous mmap, memory could
156                                            be uninitialized. */
157  #endif
158  
159 diff --git a/libc/sysdeps/linux/powerpc/bits/mman.h b/libc/sysdeps/linux/powerpc/bits/mman.h
160 index 2d234c5..b766cb6 100644
161 --- a/libc/sysdeps/linux/powerpc/bits/mman.h
162 +++ b/libc/sysdeps/linux/powerpc/bits/mman.h
163 @@ -63,7 +63,7 @@
164  # define MAP_NORESERVE 0x00040         /* Don't check for reservations.  */
165  # define MAP_POPULATE  0x08000         /* Populate (prefault) pagetables.  */
166  # define MAP_NONBLOCK  0x10000         /* Do not block on IO.  */
167 -# define MAP_UNINITIALIZE 0x4000000     /* For anonymous mmap, memory could
168 +# define MAP_UNINITIALIZED 0x4000000    /* For anonymous mmap, memory could
169                                            be uninitialized. */
170  #endif
171  
172 diff --git a/libc/sysdeps/linux/sparc/bits/mman.h b/libc/sysdeps/linux/sparc/bits/mman.h
173 index 74921e4..2463e7d 100644
174 --- a/libc/sysdeps/linux/sparc/bits/mman.h
175 +++ b/libc/sysdeps/linux/sparc/bits/mman.h
176 @@ -65,7 +65,7 @@
177  # define _MAP_NEW      0x80000000      /* Binary compatibility with SunOS.  */
178  # define MAP_POPULATE  0x8000          /* Populate (prefault) pagetables.  */
179  # define MAP_NONBLOCK  0x10000         /* Do not block on IO.  */
180 -# define MAP_UNINITIALIZE 0x4000000     /* For anonymous mmap, memory could
181 +# define MAP_UNINITIALIZED 0x4000000    /* For anonymous mmap, memory could
182                                            be uninitialized. */
183  #endif
184  
185 diff --git a/libc/sysdeps/linux/xtensa/bits/mman.h b/libc/sysdeps/linux/xtensa/bits/mman.h
186 index fead3ac..dfd9e4c 100644
187 --- a/libc/sysdeps/linux/xtensa/bits/mman.h
188 +++ b/libc/sysdeps/linux/xtensa/bits/mman.h
189 @@ -64,7 +64,7 @@
190  # define MAP_NORESERVE 0x0400          /* Don't check for reservations.  */
191  # define MAP_POPULATE  0x10000         /* Populate (prefault) pagetables.  */
192  # define MAP_NONBLOCK  0x20000         /* Do not block on IO.  */
193 -# define MAP_UNINITIALIZE 0x4000000     /* For anonymous mmap, memory could
194 +# define MAP_UNINITIALIZED 0x4000000    /* For anonymous mmap, memory could
195                                            be uninitialized. */
196  #endif
197  
198 -- 
199 1.7.10.4
200