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