Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit ec81cc4

Browse files
committed
memory/patcher: add #if check for MREMAP_FIXED
This commit fixes a compile error when the system has mremap but not MREMAP_FIXED. In this case we do not care about the value of new_address as the argument does not exist. Signed-off-by: Nathan Hjelm <[email protected]> (cherry picked from open-mpi/ompi@14c34ae) Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 86e5424 commit ec81cc4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

opal/mca/memory/patcher/memory_patcher_component.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,11 @@ static void *intercept_mremap (void *start, size_t oldlen, size_t newlen, int fl
175175
opal_mem_hooks_release_hook (start, oldlen, true);
176176
}
177177

178+
#if defined(MREMAP_FIXED)
178179
if (!(flags & MREMAP_FIXED)) {
179180
new_address = NULL;
180181
}
182+
#endif
181183

182184
if (!original_mremap) {
183185
result = (void *)(intptr_t) memory_patcher_syscall (SYS_mremap, start, oldlen, newlen, flags, new_address);

0 commit comments

Comments
 (0)