libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum

PR:             273966
Reviewed by:	emaste

(cherry picked from commit 633094c27f)
This commit is contained in:
John Hein 2023-09-21 17:43:05 -06:00 committed by Ed Maste
parent d0c0dcf9db
commit fd8bf2ecc0

View file

@ -119,7 +119,7 @@ procstat_core_open(const char *filename)
warnx("%s is not a CORE file", filename);
goto fail;
}
if (elf_getphnum(e, &nph) == 0) {
if (elf_getphdrnum(e, &nph) == -1) {
warnx("program headers not found");
goto fail;
}