mirror of https://github.com/PCSX2/pcsx2.git
build: Fix build on FreeBSD
- ftruncate64() does not exist on FreeBSD - add missing environ(7) declaration
This commit is contained in:
parent
67f1cd4e15
commit
aa59547af7
|
@ -174,7 +174,7 @@ void* HostSys::CreateSharedMemory(const char* name, size_t size)
|
||||||
shm_unlink(name);
|
shm_unlink(name);
|
||||||
|
|
||||||
// ensure it's the correct size
|
// ensure it's the correct size
|
||||||
#ifndef __APPLE__
|
#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
||||||
if (ftruncate64(fd, static_cast<off64_t>(size)) < 0)
|
if (ftruncate64(fd, static_cast<off64_t>(size)) < 0)
|
||||||
#else
|
#else
|
||||||
if (ftruncate(fd, static_cast<off_t>(size)) < 0)
|
if (ftruncate(fd, static_cast<off_t>(size)) < 0)
|
||||||
|
|
|
@ -72,6 +72,8 @@ std::string GetOSVersionString()
|
||||||
|
|
||||||
static bool SetScreensaverInhibitX11(const WindowInfo& wi, bool inhibit)
|
static bool SetScreensaverInhibitX11(const WindowInfo& wi, bool inhibit)
|
||||||
{
|
{
|
||||||
|
extern char **environ;
|
||||||
|
|
||||||
const char* command = "xdg-screensaver";
|
const char* command = "xdg-screensaver";
|
||||||
const char* operation = inhibit ? "suspend" : "resume";
|
const char* operation = inhibit ? "suspend" : "resume";
|
||||||
std::string id = fmt::format("0x{:X}", static_cast<u64>(reinterpret_cast<uintptr_t>(wi.window_handle)));
|
std::string id = fmt::format("0x{:X}", static_cast<u64>(reinterpret_cast<uintptr_t>(wi.window_handle)));
|
||||||
|
|
Loading…
Reference in New Issue