mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 03:01:57 +02:00
Fix compilation on systems that dont have the memfd_create syscall
This commit is contained in:
2
glfw/memfd.h
vendored
2
glfw/memfd.h
vendored
@@ -6,7 +6,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(__linux__)
|
||||
#ifdef HAS_MEMFD_CREATE
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <unistd.h>
|
||||
|
||||
2
glfw/wl_window.c
vendored
2
glfw/wl_window.c
vendored
@@ -140,7 +140,7 @@ static int
|
||||
createAnonymousFile(off_t size)
|
||||
{
|
||||
int ret;
|
||||
#if defined(__linux__)
|
||||
#ifdef HAS_MEMFD_CREATE
|
||||
int fd = memfd_create("glfw-shared", MFD_CLOEXEC | MFD_ALLOW_SEALING);
|
||||
if (fd < 0) return -1;
|
||||
// We can add this seal before calling posix_fallocate(), as the file
|
||||
|
||||
Reference in New Issue
Block a user