The branch stable/13 has been updated by emaste:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=09cd74a0b8d5a0b625ac7706ddc4655664fb05f9

commit 09cd74a0b8d5a0b625ac7706ddc4655664fb05f9
Author:     John Hein <[email protected]>
AuthorDate: 2023-09-21 23:43:05 +0000
Commit:     Ed Maste <[email protected]>
CommitDate: 2023-09-26 13:04:40 +0000

    libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum
    
    PR:             273966
    Reviewed by:    emaste
    
    (cherry picked from commit 633094c27f0ac1b1001d5bd24a883240b4bce1dc)
    (cherry picked from commit fd8bf2ecc05af841aa7e8369a43861cdc122d404)
---
 lib/libprocstat/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libprocstat/core.c b/lib/libprocstat/core.c
index dea078c848eb..cf3435a10c79 100644
--- a/lib/libprocstat/core.c
+++ b/lib/libprocstat/core.c
@@ -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;
        }

Reply via email to