From 9b56b10a186877d32c47be051250ffb307404e78 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 27 May 2013 12:28:34 +0200 Subject: [PATCH] (Blackberry Playbook) Fix Blackberry Playbook build - strcasestr is not implemented --- frontend/libretro.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/frontend/libretro.c b/frontend/libretro.c index 9be52f5d..ec034c20 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -591,6 +591,33 @@ static void extract_directory(char *buf, const char *path, size_t size) } } +#ifdef __QNX__ +/* Blackberry QNX doesn't have strcasestr */ + +/* + * Find the first occurrence of find in s, ignore case. + */ +char * +strcasestr(const char *s, const char*find) +{ + char c, sc; + size_t len; + + if ((c = *find++) != 0) { + c = tolower((unsigned char)c); + len = strlen(find); + do { + do { + if ((sc = *s++) == 0) + return (NULL); + } while ((char)tolower((unsigned char)sc) != c); + } while (strncasecmp(s, find, len) != 0); + s--; + } + return ((char *)s); +} +#endif + bool retro_load_game(const struct retro_game_info *info) { size_t i; -- 2.39.5