gh-89452: Prefer gdbm-compat over ndbm (#92208)

This makes macOS gdbm provided by Homebrew not segfault through correct
selection of the linked library (-lgdbm_compat) *AND* the correct ndbm-style
header (gdbm-ndbm.h instead of the invalid ndbm.h).
This commit is contained in:
Łukasz Langa 2022-05-03 18:27:38 +02:00 committed by GitHub
parent feca9bbd1f
commit 6c25bf07e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 9 deletions

View file

@ -1207,7 +1207,7 @@ class PyBuildExt(build_ext):
if dbm_args:
dbm_order = [arg.split('=')[-1] for arg in dbm_args][-1].split(":")
else:
dbm_order = "ndbm:gdbm:bdb".split(":")
dbm_order = "gdbm:ndbm:bdb".split(":")
dbmext = None
for cand in dbm_order:
if cand == "ndbm":