VERY experimental Nintendo Switch 2 emulator
C++
host_memory: Add workaround for FreeBSD 12
Jan Beich471ddd06748c
diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cppindex 49e58d250e..6661244cfb 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);+#elsefd = memfd_create("HostMemory", 0);+#endifif (fd == -1) {LOG_CRITICAL(HW_Memory, "memfd_create failed: {}", strerror(errno));throw std::bad_alloc{};