test: add sigabbrev_np() for systems where it's not available

sigabbrev_np() was first added to glibc 2.32 (Aug 2020) which is too recent
for some of the distributions we support.
This commit is contained in:
Peter Hutterer 2021-06-10 08:33:36 +10:00
parent 5cf3c28fa4
commit 731f45ed50
6 changed files with 125 additions and 0 deletions

View file

@ -278,6 +278,10 @@ if cc.has_function('getrandom', prefix : '#include <sys/random.h>', args : [ '-D
cdata.set('HAVE_GETRANDOM', 1)
endif
if cc.has_function('sigabbrev_np', prefix : '#include <string.h>', args : [ '-D_GNU_SOURCE' ])
cdata.set('HAVE_SIGABBREV_NP', 1)
endif
systemd = dependency('systemd', required: get_option('systemd'))
systemd_dep = dependency('libsystemd',required: get_option('systemd'))
if systemd.found() and systemd_dep.found()