mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-19 03:55:49 +00:00
Fix MacOS build
This commit is contained in:
parent
7734943620
commit
f48f818f4c
@ -5,7 +5,6 @@
|
||||
|
||||
#include <loguru.hpp>
|
||||
|
||||
#include <malloc.h>
|
||||
#include <pthread.h>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
@ -39,6 +38,10 @@
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
struct PlatformMutexLinux : public PlatformMutex {
|
||||
sem_t* sem_ = nullptr;
|
||||
|
||||
@ -259,7 +262,9 @@ std::vector<std::string> GetPlatformClangArguments() {
|
||||
#undef CHECKED
|
||||
|
||||
void FreeUnusedMemory() {
|
||||
#if defined(__linux__)
|
||||
malloc_trim(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user