From 1deec06ad3eea05d8f23edf6177ba53f15b808bb Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Wed, 10 Jul 2019 18:06:42 +0300 Subject: [PATCH] rofi: add strchrnul() implementation for android-5 support --- .../rofi/source-dialogs-combi.c.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 x11-packages/rofi/source-dialogs-combi.c.patch diff --git a/x11-packages/rofi/source-dialogs-combi.c.patch b/x11-packages/rofi/source-dialogs-combi.c.patch new file mode 100644 index 000000000..0ad59dd0c --- /dev/null +++ b/x11-packages/rofi/source-dialogs-combi.c.patch @@ -0,0 +1,21 @@ +diff -uNr rofi-1.5.4/source/dialogs/combi.c rofi-1.5.4.mod/source/dialogs/combi.c +--- rofi-1.5.4/source/dialogs/combi.c 2019-07-01 15:29:09.000000000 +0300 ++++ rofi-1.5.4.mod/source/dialogs/combi.c 2019-07-10 18:05:55.843575801 +0300 +@@ -150,6 +150,17 @@ + mode_set_private_data ( sw, NULL ); + } + } ++ ++#if defined(__ANDROID_API__) && __ANDROID_API__ < 24 ++static char *strchrnul(const char *s, int c) ++{ ++ char *x = strchr(s, c); ++ if (!x) ++ return (char *)s + strlen(s); ++ return x; ++} ++#endif ++ + static ModeMode combi_mode_result ( Mode *sw, int mretv, char **input, unsigned int selected_line ) + { + CombiModePrivateData *pd = mode_get_private_data ( sw );