[gtk: 1/2] gdk/wayland/cursor/os-compatibility: fix build when memfd_create is not available




commit 2a610267eb1a41e0074f1842918872419d9de1e0
Author: David Lechner <david lechnology com>
Date:   Tue Apr 27 11:37:16 2021 -0500

    gdk/wayland/cursor/os-compatibility: fix build when memfd_create is not available
    
    When building for homebrew/linuxbrew on Ubuntu 16.04, memfd_create() is
    not available and causes the build to fail.
    
    This adds a proper check for the function.

 gdk/wayland/cursor/os-compatibility.c | 1 -
 meson.build                           | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gdk/wayland/cursor/os-compatibility.c b/gdk/wayland/cursor/os-compatibility.c
index c59733964f..3818a6170e 100644
--- a/gdk/wayland/cursor/os-compatibility.c
+++ b/gdk/wayland/cursor/os-compatibility.c
@@ -32,7 +32,6 @@
 #include <string.h>
 #include <stdlib.h>
 
-#define HAVE_MEMFD_CREATE
 #ifdef HAVE_MEMFD_CREATE
 #include <sys/mman.h>
 #endif
diff --git a/meson.build b/meson.build
index 35803e6161..beba87461e 100644
--- a/meson.build
+++ b/meson.build
@@ -193,6 +193,7 @@ check_functions = [
   'getpagesize',
   'getresuid',
   'lstat',
+  'memfd_create',
   'mmap',
   'posix_fallocate',
   '_lock_file',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]