summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2020-05-12 18:17:57 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2020-05-12 18:17:57 +0000
commitbbbed78aaa9ad2d55ed30c15707e7efce92b80d1 (patch)
tree1f0d846c33e741d785301bbe1fcf00f472adce7b /include
parent4f5f00d82d4d959e6af27f1fb151145d54048799 (diff)
downloadsrc-test2-bbbed78aaa9ad2d55ed30c15707e7efce92b80d1.tar.gz
src-test2-bbbed78aaa9ad2d55ed30c15707e7efce92b80d1.zip
Make include/malloc.h usable again.
Lot of third-party Linux code uses #include <malloc.h>, expecting to find the malloc extensions there. Instead of trying to fight them, accept that attempt to deprecate the header causes more troubles than solves potential portability issues, and provide our jemalloc extensions. PR: 155429 Reviewed by: imp, jhibbits, dab, hselasky, philip, emaste, jilles Exp-run by: antoine (PR 245366) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D24297
Notes
Notes: svn path=/head/; revision=360984
Diffstat (limited to 'include')
-rw-r--r--include/malloc.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/malloc.h b/include/malloc.h
index 5d7d7e8396d3..75673c72ed85 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -1,6 +1,6 @@
-/* $FreeBSD$ */
-#if __STDC__
-#error "<malloc.h> has been replaced by <stdlib.h>"
-#else
+/*-
+ * This file is in the public domain.
+ * $FreeBSD$
+ */
#include <stdlib.h>
-#endif
+#include <malloc_np.h>