]> git.kaiwu.me - njs.git/commitdiff
Fixed PTR macro compatibility with newer BFD library.
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 4 Feb 2026 04:17:51 +0000 (20:17 -0800)
committerDmitry Volyntsev <xeioexception@gmail.com>
Thu, 5 Feb 2026 23:32:12 +0000 (15:32 -0800)
The deprecated PTR macro was removed in recent versions of binutils.
Replaced with (void **) cast.

src/njs_addr2line.c

index 279c9ad76d8cd08599c2df991258a62b964ad05a..77891056e1e70d6b1c0f1727c0982ccfa94fddd6 100644 (file)
@@ -152,10 +152,10 @@ njs_read_symtab(bfd *abfd, asymbol ***syms)
         return 0;
     }
 
-    symcount = bfd_read_minisymbols(abfd, 0, (PTR) syms, &size);
+    symcount = bfd_read_minisymbols(abfd, 0, (void **) syms, &size);
     if (symcount == 0) {
         symcount = bfd_read_minisymbols(abfd, 1 /* dynamic */,
-                                        (PTR) syms, &size);
+                                        (void **) syms, &size);
     }
 
     return symcount;