From acf61456cc55441a0f09b361a531d628d390031b Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 3 May 2024 03:37:10 +0300 Subject: libcamera: shared_mem_object: Fix compilation with uClibc uClibc doesn't provide a memfd_create() implementation. Fix it by using a direct syscall when the function isn't available. Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Stefan Klug --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 740ead1b..39e4947f 100644 --- a/meson.build +++ b/meson.build @@ -82,6 +82,10 @@ if cc.has_header_symbol('locale.h', 'locale_t', prefix : '#define _GNU_SOURCE') config_h.set('HAVE_LOCALE_T', 1) endif +if cc.has_header_symbol('sys/mman.h', 'memfd_create', prefix : '#define _GNU_SOURCE') + config_h.set('HAVE_MEMFD_CREATE', 1) +endif + if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOURCE') config_h.set('HAVE_SECURE_GETENV', 1) endif -- cgit v1.2.1