From 5a408ec4cf93d1d6800f49e251692724f1ee0fa1 Mon Sep 17 00:00:00 2001 From: Muh Muhten Date: Thu, 27 Jan 2022 18:06:35 -0500 Subject: [PATCH] Replace use of index() with strchr index() is a legacy string function formerly "equivalent to strchr", now omitted from POSIX. This fixes builds on some newer libcs. Signed-off-by: Muh Muhten Reviewed-by: Rob Browning Tested-by: Rob Browning --- lib/cmd/bup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmd/bup.c b/lib/cmd/bup.c index 7f69291..228276a 100644 --- a/lib/cmd/bup.c +++ b/lib/cmd/bup.c @@ -225,7 +225,7 @@ static char *find_in_path(const char * const name, const char * const path) static char *find_exe_parent(const char * const argv_0) { char *candidate = NULL; - const char * const slash = index(argv_0, '/'); + const char * const slash = strchr(argv_0, '/'); if (slash) { candidate = strdup(argv_0); assert(candidate); -- 2.39.2