Summary:
- This fixes a bug introduced in
D1002959 that broke -fb platform
compilation: there was noone to forward-declare these symbols.
Test Plan:
- Built the gcc-4.8.1-glibc-2.17-fb platform
- fbconfig -r folly && fbmake runtests
- configure/make check on Mac OS X
Reviewed By: andrei.alexandrescu@fb.com
FB internal diff:
D1074720
Blame Revision:
D1002959
#ifdef _LIBSTDCXX_FBSTRING
#pragma GCC system_header
+
+/**
+ * Declare rallocm() and allocm() as weak symbols. These will be provided by
+ * jemalloc if we are using jemalloc, or will be NULL if we are using another
+ * malloc implementation.
+ */
+extern "C" int rallocm(void**, size_t*, size_t, size_t, int)
+__attribute__((weak));
+extern "C" int allocm(void**, size_t*, size_t, int)
+__attribute__((weak));
+
#define FOLLY_HAVE_MALLOC_H 1
#else
#include "folly/detail/Malloc.h"