From eab0544f230ae4d89d139a9a7af1a7281c40689a Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Mon, 27 Jan 2014 21:00:58 +0200 Subject: [PATCH] module: Replace rindex() with strrchr() rindex() appears to be "non-standard" to an extent, and it caused a build failure on mingw32. From the man page of rindex(): "POSIX.1-2008 removes the specifications of index() and rindex(), recommending strchr(3) and strrchr(3) instead." --- src/pulsecore/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c index c57acac2..bee8a20e 100644 --- a/src/pulsecore/module.c +++ b/src/pulsecore/module.c @@ -67,7 +67,7 @@ bool pa_module_exists(const char *name) { /* strip .so from the end of name, if present */ n = pa_xstrdup(name); - p = rindex(n, '.'); + p = strrchr(n, '.'); if (p && pa_streq(p, PA_SOEXT)) p[0] = 0; -- 2.39.2