File: unsubmitted-mremap.diff

package info (click to toggle)
glibc 2.24-11%2Bdeb9u3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 225,316 kB
  • sloc: ansic: 996,116; asm: 261,826; sh: 10,483; makefile: 9,849; cpp: 4,169; python: 3,971; perl: 2,254; awk: 1,753; pascal: 1,521; yacc: 291; sed: 80
file content (29 lines) | stat: -rw-r--r-- 783 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
MREMAP is unimplemented on GNU/Hurd for now

--- a/bits/mman.h
+++ b/bits/mman.h
@@ -85,10 +85,12 @@
 #define MS_INVALIDATE	2		/* Invalidate the caches.  */
 
 /* Flags for `mremap'.  */
+#if 0
 #ifdef __USE_GNU
 # define MREMAP_MAYMOVE	1		/* Mapping address may change.  */
 # define MREMAP_FIXED	2		/* Fifth argument sets new address.  */
 #endif
+#endif
 
 /* Flags for `mlockall' (can be OR'd together).  */
 #define MCL_CURRENT	1		/* Lock all currently mapped pages.  */
--- a/malloc/memusage.c
+++ b/malloc/memusage.c
@@ -680,6 +680,9 @@ mmap64 (void *start, size_t len, int pro
   return result;
 }
 
+#ifndef MREMAP_FIXED
+#define MREMAP_FIXED 0
+#endif
 
 /* `mremap' replacement.  We do not have to keep track of the size since
    `munmap' will get it as a parameter.  */