From e4589e267498c3d974619398397b0b121d740369 Mon Sep 17 00:00:00 2001 From: meator Date: Sat, 31 May 2025 20:41:49 +0200 Subject: [PATCH] XF86Config-parser: Remove deprecated index() usage This strangely causes issues on armv6l-musl. index() is replaced with strchr(), which is identical and better standardized. --- src/XF86Config-parser/Files.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/XF86Config-parser/Files.c b/src/XF86Config-parser/Files.c index dac93359..8d23f4de 100644 --- a/src/XF86Config-parser/Files.c +++ b/src/XF86Config-parser/Files.c @@ -220,7 +220,7 @@ xconfigPrintFileSection (FILE * cf, XConfigFilesPtr ptr) if (ptr->modulepath) { s = ptr->modulepath; - p = index (s, ','); + p = strchr (s, ','); while (p) { *p = '\000'; @@ -228,14 +228,14 @@ xconfigPrintFileSection (FILE * cf, XConfigFilesPtr ptr) *p = ','; s = p; s++; - p = index (s, ','); + p = strchr (s, ','); } fprintf (cf, " ModulePath \"%s\"\n", s); } if (ptr->inputdevs) { s = ptr->inputdevs; - p = index (s, ','); + p = strchr (s, ','); while (p) { *p = '\000'; @@ -243,14 +243,14 @@ xconfigPrintFileSection (FILE * cf, XConfigFilesPtr ptr) *p = ','; s = p; s++; - p = index (s, ','); + p = strchr (s, ','); } fprintf (cf, " InputDevices \"%s\"\n", s); } if (ptr->fontpath) { s = ptr->fontpath; - p = index (s, ','); + p = strchr (s, ','); while (p) { *p = '\000'; @@ -258,7 +258,7 @@ xconfigPrintFileSection (FILE * cf, XConfigFilesPtr ptr) *p = ','; s = p; s++; - p = index (s, ','); + p = strchr (s, ','); } fprintf (cf, " FontPath \"%s\"\n", s); }