From bc607bdfa06a6781d4865b8b1ce46ce17d0fe6e6 Mon Sep 17 00:00:00 2001 From: Adam Bliss Date: Thu, 17 Jan 2019 23:02:22 -0500 Subject: [PATCH] Actually try calling getrandom while configuring --- src/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meson.build b/src/meson.build index 03f3b1550..160fbdc98 100644 --- a/src/meson.build +++ b/src/meson.build @@ -29,9 +29,9 @@ if not have_getentropy #include #include #include - int main() { return !syscall(SYS_getrandom, (void*)0, 0, 0); } + int main() { return !(syscall(SYS_getrandom, (void*)0, 0, 0) >= 0); } ''' - getrandom = cc.links(code, name: 'getrandom syscall available') + getrandom = cc.run(code, name: 'getrandom syscall available').returncode() == 0 conf_data.set('ENT_GETRANDOM', getrandom) if not getrandom