summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-09-18 19:46:08 +0200
committerGitHub <noreply@github.com>2020-09-18 19:46:08 +0200
commit3f440b13b7d830ed44140266205ba0da9b23db53 (patch)
treedfb0ac1489ee95cabd2f4a22d5eb5d6f4a45ef5c /meson.build
parentUpdate 60-sensor.hwdb (diff)
parenttest-libcrypt-util: before doing anything check what methods are available (diff)
downloadsystemd-3f440b13b7d830ed44140266205ba0da9b23db53.tar.xz
systemd-3f440b13b7d830ed44140266205ba0da9b23db53.zip
Merge pull request #16981 from keszybz/use-crypt_ra
Use crypt_ra to allocate scratch area for password hashing
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build11
1 files changed, 11 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index e6804900a6..ce913c2ff6 100644
--- a/meson.build
+++ b/meson.build
@@ -882,6 +882,17 @@ libm = cc.find_library('m')
libdl = cc.find_library('dl')
libcrypt = cc.find_library('crypt')
+crypt_header = conf.get('HAVE_CRYPT_H') == 1 ? \
+ '''#include <crypt.h>''' : '''#include <unistd.h>'''
+foreach ident : [
+ ['crypt_ra', crypt_header],
+ ['crypt_gensalt_ra', crypt_header]]
+
+ have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE',
+ dependencies : libcrypt)
+ conf.set10('HAVE_' + ident[0].to_upper(), have)
+endforeach
+
libcap = dependency('libcap', required : false)
if not libcap.found()
# Compat with Ubuntu 14.04 which ships libcap w/o .pc file