From 01fb345fe0a812c2daf862db739692832201c67e Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 2 Feb 2014 09:00:46 +0100 Subject: [PATCH] core: fix compilation on Android (replace calls to rindex by strrchr) (bug #41420, patch #8301) --- ChangeLog | 2 ++ src/gui/gui-completion.c | 3 +-- src/plugins/rmodifier/rmodifier.c | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63aa75f2b..046c901b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,8 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] == Version 0.4.3 (under dev) +* core: fix compilation on Android (replace calls to rindex by strrchr) + (bug #41420, patch #8301) * core: fix crash when creating two bars with same name but different case (bug #41418) * core: fix display of read marker when all buffer lines are unread and that diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index c081a522b..8078e6a45 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -630,7 +629,7 @@ gui_completion_build_list (struct t_gui_completion *completion) } if (repeat_last) { - pos_space = rindex (template, ' '); + pos_space = strrchr (template, ' '); gui_completion_build_list_template (completion, (pos_space) ? pos_space + 1 : template, diff --git a/src/plugins/rmodifier/rmodifier.c b/src/plugins/rmodifier/rmodifier.c index b6fbdc512..ac3250e23 100644 --- a/src/plugins/rmodifier/rmodifier.c +++ b/src/plugins/rmodifier/rmodifier.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "../weechat-plugin.h" #include "rmodifier.h" @@ -342,7 +341,7 @@ rmodifier_new_with_string (const char *name, const char *value) new_rmodifier = NULL; pos1 = strchr (value, ';'); - pos2 = rindex (value, ';'); + pos2 = strrchr (value, ';'); if (pos1 && pos2 && (pos2 > pos1)) { modifiers = weechat_strndup (value, pos1 - value);