51f0aa
This patch fixes a compile-time type mismatch.  No upstream
51f0aa
patch; this originated in Fedora and upstream has changed the
51f0aa
underlying code in a different way.
51f0aa
51f0aa
diff -rup a/malloc/hooks.c b/malloc/hooks.c
51f0aa
--- a/malloc/hooks.c	2017-08-11 14:20:36.000000000 -0400
51f0aa
+++ b/malloc/hooks.c	2017-08-11 15:43:15.939831964 -0400
51f0aa
@@ -240,10 +240,10 @@ top_check(void)
51f0aa
 	(char*)t + chunksize(t) == mp_.sbrk_base + main_arena.system_mem)))
51f0aa
     return 0;
51f0aa
 
51f0aa
-  mutex_unlock(&main_arena);
51f0aa
+  mutex_unlock(&main_arena.mutex);
51f0aa
   malloc_printerr (check_action, "malloc: top chunk is corrupt", t,
51f0aa
 		   &main_arena);
51f0aa
-  mutex_lock(&main_arena);
51f0aa
+  mutex_lock(&main_arena.mutex);
51f0aa
 
51f0aa
   /* Try to set up a new top chunk. */
51f0aa
   brk = MORECORE(0);