summaryrefslogtreecommitdiff
blob: c18f946c4c244a84ee385a61e9f2d1e7a8452710 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- libc/stdlib/malloc-standard/malloc.h.mps	Sat Jan 31 11:26:14 2004
+++ libc/stdlib/malloc-standard/malloc.h	Sat Jan 31 11:28:29 2004
@@ -20,6 +20,7 @@
 #include <errno.h>
 #include <string.h>
 #include <malloc.h>
+#include <stdlib.h>
 
 
 #ifdef __UCLIBC_HAS_THREADS__
@@ -636,6 +637,8 @@
 #define unlink(P, BK, FD) {                                            \
   FD = P->fd;                                                          \
   BK = P->bk;                                                          \
+  if (FD->bk != P || BK->fd != P)                                      \
+      abort();                                                         \
   FD->bk = BK;                                                         \
   BK->fd = FD;                                                         \
 }