mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 19:07:01 +02:00
ci: add macOS build workflow (#114)
* ci: add macOS build workflow * macos: add POSIX compatibility guards * ci: select Xcode 26 for macOS * macos: add kernel POSIX compatibility * launcher: support macOS process startup * ci: fix macOS architecture verification * ci: cache glslang on Windows --------- Co-authored-by: Abdullah K. <akjee204@gmail.com>
This commit is contained in:
@@ -54,9 +54,21 @@ public:
|
||||
m_handle = nullptr;
|
||||
}
|
||||
#elif KYTY_PLATFORM == KYTY_PLATFORM_LINUX
|
||||
#if defined(__APPLE__)
|
||||
{
|
||||
char shm_name[64];
|
||||
snprintf(shm_name, sizeof(shm_name), "/kyty-dm-%d-%llx", static_cast<int>(getpid()),
|
||||
static_cast<unsigned long long>(reinterpret_cast<uintptr_t>(this)));
|
||||
m_fd = shm_open(shm_name, O_RDWR | O_CREAT | O_EXCL, 0600);
|
||||
if (m_fd >= 0) {
|
||||
shm_unlink(shm_name);
|
||||
}
|
||||
}
|
||||
#else
|
||||
m_fd = static_cast<int>(syscall(SYS_memfd_create, "KytyDirectMemory", 0));
|
||||
#endif
|
||||
if (m_fd < 0) {
|
||||
LOGF_COLOR(Log::Color::Red, "\t direct-memory backing: memfd_create failed: %d\n",
|
||||
LOGF_COLOR(Log::Color::Red, "\t direct-memory backing: shared fd creation failed: %d\n",
|
||||
errno);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user