summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-06-16 18:30:23 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-06-19 16:52:33 +0300
commit969da31894394db4f64c4a0e96ec2252fb13142b (patch)
tree80870112dc39cdead601b85ffce548ed8d742e20 /meson.build
parent73b823b22009b87fc1d33a8000a870fe9223e7bb (diff)
libcamera: utils: Support systems that lack secure_getenv and issetugid
Android provides neither secure_getenv() nor issetugid(). Enable compilation on that platform by using a plain getenv(), as that seems to be the best we can do. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build4
1 files changed, 4 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index f6ab7380..4d7d936f 100644
--- a/meson.build
+++ b/meson.build
@@ -33,6 +33,10 @@ if cc.has_header_symbol('execinfo.h', 'backtrace')
config_h.set('HAVE_BACKTRACE', 1)
endif
+if cc.has_header_symbol('unistd.h', 'issetugid')
+ config_h.set('HAVE_ISSETUGID', 1)
+endif
+
if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOURCE')
config_h.set('HAVE_SECURE_GETENV', 1)
endif