diff options
author | Dmitry V. Levin <ldv@strace.io> | 2024-10-15 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2024-10-15 08:00:00 +0000 |
commit | 29c390c7e5c7ee12a1beebd7458aed2fcba53f91 (patch) | |
tree | 8c9490a470d75a0e96d92a82d3f4d77922bfc450 /meson.build | |
parent | 83aa08a30f39c10e4cecae43686eb86a1e045496 (diff) | |
download | pam-29c390c7e5c7ee12a1beebd7458aed2fcba53f91.tar.gz pam-29c390c7e5c7ee12a1beebd7458aed2fcba53f91.tar.bz2 pam-29c390c7e5c7ee12a1beebd7458aed2fcba53f91.zip |
build: check gdbm_close return type
gdbm_close() used to return void, later it was changed to return int.
We cannot assume either way and have to check whether gdbm_close()
returns int.
Fixes: 45c2c496dcf8 ("pam_userdb: enable GDBM support")
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 840ff74f..7fc68b96 100644 --- a/meson.build +++ b/meson.build @@ -372,6 +372,12 @@ else if have use_db = 'gdbm' cdata.set('HAVE_GDBM_H', 1) + if cc.compiles('''#include <gdbm.h> + int db_close(void *dbm) {return gdbm_close(dbm);}''', + args: '-D_GNU_SOURCE', + name: 'gdbm_close returns int') + cdata.set('GDBM_CLOSE_RETURNS_INT', 1) + endif endif endif endif |