Fix the libc hook.

Friend declarations to `extern "C"` functions must have a forward
declaration with the correct signature.
This commit is contained in:
David Chisnall
2019-07-16 10:55:29 +01:00
parent a2a47d9a50
commit d3f5dcefe4

View File

@@ -7,6 +7,8 @@
#error At most one out of SNMALLOC_USE_THREAD_CLEANUP and SNMALLOC_USE_THREAD_DESTRUCTOR may be defined.
#endif
extern "C" void _malloc_thread_cleanup();
namespace snmalloc
{
/**
@@ -147,7 +149,7 @@ namespace snmalloc
* This function must be allowed to call back into this class to destroy
* the state.
*/
friend void _malloc_thread_cleanup();
friend void ::_malloc_thread_cleanup();
};
/**