Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/asmjit/asmjit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@bidouilliste.com>2020-09-27 17:48:06 +0300
committerGitHub <noreply@github.com>2020-09-27 17:48:06 +0300
commitcfdf5bd4eb68e2d3ba97793a9be6d419d9150edf (patch)
treebf6b2163d2620c83bb653a747530e662b850a5c6
parentb49d685cd9e2e4488f55ce6004306a79bdea056b (diff)
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>
-rw-r--r--src/asmjit/core/virtmem.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/asmjit/core/virtmem.cpp b/src/asmjit/core/virtmem.cpp
index 0606748..8f7d9a8 100644
--- a/src/asmjit/core/virtmem.cpp
+++ b/src/asmjit/core/virtmem.cpp
@@ -351,10 +351,12 @@ static ASMJIT_INLINE int VirtMem_appleSpecificMMapFlags(uint32_t flags) {
}
#endif
+#if !defined(SHM_ANON)
static const char* VirtMem_getTmpDir() noexcept {
const char* tmpDir = getenv("TMPDIR");
return tmpDir ? tmpDir : "/tmp";
}
+#endif
static Error VirtMem_openAnonymousMemory(int* fd, bool preferTmpOverDevShm) noexcept {
#if defined(SYS_memfd_create)