mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-18 13:04:36 +03:00
FreeBSD: Fix compilation with -Werror (#302)
VirtMem_getTmpDir is not used when SHM_ANON is defined which is the case on FreeBSD. This breaks compilation if -Werror is defined. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
This commit is contained in:
@@ -351,10 +351,12 @@ static ASMJIT_INLINE int VirtMem_appleSpecificMMapFlags(uint32_t flags) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(SHM_ANON)
|
||||||
static const char* VirtMem_getTmpDir() noexcept {
|
static const char* VirtMem_getTmpDir() noexcept {
|
||||||
const char* tmpDir = getenv("TMPDIR");
|
const char* tmpDir = getenv("TMPDIR");
|
||||||
return tmpDir ? tmpDir : "/tmp";
|
return tmpDir ? tmpDir : "/tmp";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static Error VirtMem_openAnonymousMemory(int* fd, bool preferTmpOverDevShm) noexcept {
|
static Error VirtMem_openAnonymousMemory(int* fd, bool preferTmpOverDevShm) noexcept {
|
||||||
#if defined(SYS_memfd_create)
|
#if defined(SYS_memfd_create)
|
||||||
|
|||||||
Reference in New Issue
Block a user