diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2021-07-27 22:06:25 +0200 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2021-07-27 22:15:23 +0200 |
commit | 353be2306c7b3b640755fbf9b95aa0c75c6a7cfe (patch) | |
tree | 1b185980a814f2cca0dee9a0dad69ef29e50a527 /src/common/host_memory.cpp | |
parent | host_memory: Enable Linux implementation on FreeBSD (diff) | |
download | yuzu-353be2306c7b3b640755fbf9b95aa0c75c6a7cfe.tar yuzu-353be2306c7b3b640755fbf9b95aa0c75c6a7cfe.tar.gz yuzu-353be2306c7b3b640755fbf9b95aa0c75c6a7cfe.tar.bz2 yuzu-353be2306c7b3b640755fbf9b95aa0c75c6a7cfe.tar.lz yuzu-353be2306c7b3b640755fbf9b95aa0c75c6a7cfe.tar.xz yuzu-353be2306c7b3b640755fbf9b95aa0c75c6a7cfe.tar.zst yuzu-353be2306c7b3b640755fbf9b95aa0c75c6a7cfe.zip |
Diffstat (limited to 'src/common/host_memory.cpp')
-rw-r--r-- | src/common/host_memory.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp index 49e58d250..6661244cf 100644 --- a/src/common/host_memory.cpp +++ b/src/common/host_memory.cpp @@ -357,7 +357,12 @@ public: }); // Backing memory initialization +#if defined(__FreeBSD__) && __FreeBSD__ < 13 + // XXX Drop after FreeBSD 12.* reaches EOL on 2024-06-30 + fd = shm_open(SHM_ANON, O_RDWR, 0600); +#else fd = memfd_create("HostMemory", 0); +#endif if (fd == -1) { LOG_CRITICAL(HW_Memory, "memfd_create failed: {}", strerror(errno)); throw std::bad_alloc{}; |