fix: breakpad use miniz
Some checks failed
sm-rpc / build (Debug, arm-linux-gnueabihf) (push) Successful in 1m34s
sm-rpc / build (Debug, aarch64-linux-gnu) (push) Successful in 2m46s
sm-rpc / build (Debug, host.gcc) (push) Failing after 1m28s
sm-rpc / build (Release, aarch64-linux-gnu) (push) Successful in 2m14s
sm-rpc / build (Release, arm-linux-gnueabihf) (push) Successful in 2m8s
sm-rpc / build (Debug, mipsel-linux-gnu) (push) Successful in 5m35s
sm-rpc / build (Release, host.gcc) (push) Failing after 1m55s
sm-rpc / build (Release, mipsel-linux-gnu) (push) Successful in 7m21s
Some checks failed
sm-rpc / build (Debug, arm-linux-gnueabihf) (push) Successful in 1m34s
sm-rpc / build (Debug, aarch64-linux-gnu) (push) Successful in 2m46s
sm-rpc / build (Debug, host.gcc) (push) Failing after 1m28s
sm-rpc / build (Release, aarch64-linux-gnu) (push) Successful in 2m14s
sm-rpc / build (Release, arm-linux-gnueabihf) (push) Successful in 2m8s
sm-rpc / build (Debug, mipsel-linux-gnu) (push) Successful in 5m35s
sm-rpc / build (Release, host.gcc) (push) Failing after 1m55s
sm-rpc / build (Release, mipsel-linux-gnu) (push) Successful in 7m21s
This commit is contained in:
38
third_party/tracy/server/TracyMmap.cpp
vendored
Normal file
38
third_party/tracy/server/TracyMmap.cpp
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
#include "TracyMmap.hpp"
|
||||
|
||||
#if defined _WIN32
|
||||
# include <io.h>
|
||||
# include <windows.h>
|
||||
|
||||
void* mmap( void* addr, size_t length, int prot, int flags, int fd, off_t offset )
|
||||
{
|
||||
HANDLE hnd;
|
||||
void* map = nullptr;
|
||||
|
||||
switch( prot )
|
||||
{
|
||||
case PROT_READ:
|
||||
if( hnd = CreateFileMapping( HANDLE( _get_osfhandle( fd ) ), nullptr, PAGE_READONLY, 0, 0, nullptr ) )
|
||||
{
|
||||
map = MapViewOfFile( hnd, FILE_MAP_READ, 0, 0, length );
|
||||
CloseHandle( hnd );
|
||||
}
|
||||
break;
|
||||
case PROT_WRITE:
|
||||
if( hnd = CreateFileMapping( HANDLE( _get_osfhandle( fd ) ), nullptr, PAGE_READWRITE, 0, 0, nullptr ) )
|
||||
{
|
||||
map = MapViewOfFile( hnd, FILE_MAP_WRITE, 0, 0, length );
|
||||
CloseHandle( hnd );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return map ? (char*)map + offset : (void*)-1;
|
||||
}
|
||||
|
||||
int munmap( void* addr, size_t length )
|
||||
{
|
||||
return UnmapViewOfFile( addr ) != 0 ? 0 : -1;
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user