Remove use of rindex() function

rindex() has been removed from POSIX 2008.  Replace the one remaining
use with the equivalent and more standard strrchr().

Reviewed-by: Jelte Fennema-Nio <postgres@jeltef.nl>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/98ce805c-6103-421b-adc3-fcf8f3dddbe3%40eisentraut.org
This commit is contained in:
Peter Eisentraut
2026-01-08 08:45:59 +01:00
parent 5e7abdac99
commit 6ade3cd459

View File

@ -1058,7 +1058,7 @@ llvm_split_symbol_name(const char *name, char **modname, char **funcname)
* Symbol names cannot contain a ., therefore we can split based on
* first and last occurrence of one.
*/
*funcname = rindex(name, '.');
*funcname = strrchr(name, '.');
(*funcname)++; /* jump over . */
*modname = pnstrdup(name + strlen("pgextern."),