Skip to content

Commit 8f93b15

Browse files
committed
Merge pull request #1580 from hjelmn/new_hooks_update
memory/patcher: cast away const in shmdt hook
2 parents df19408 + 5612998 commit 8f93b15

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

opal/mca/memory/patcher/memory_patcher_component.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,9 @@ static int intercept_shmdt (const void *shmaddr)
344344
OPAL_PATCHER_BEGIN;
345345
int result;
346346

347-
opal_mem_hooks_release_hook (shmaddr, memory_patcher_get_shm_seg_size (shmaddr), false);
347+
/* opal_mem_hooks_release_hook should probably be updated to take a const void *.
348+
* for now just cast away the const */
349+
opal_mem_hooks_release_hook ((void *) shmaddr, memory_patcher_get_shm_seg_size (shmaddr), false);
348350

349351
if (original_shmdt) {
350352
result = original_shmdt (shmaddr);

0 commit comments

Comments
 (0)