From 4b1221d556c6a2c51ae3cee5ffe13dbf0e4dfab8 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 13 Feb 2014 22:24:29 +1100 Subject: fix red, strtok_r being annoying on sim builds Change-Id: Ifb884a53d801db9534dd0c5ab5921800e971963e --- apps/plugin.h | 1 + apps/plugins/main_menu_config.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/plugin.h b/apps/plugin.h index 0e0580501d..764af4a6b7 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -45,6 +45,7 @@ #undef strcmp #undef strncmp #undef strchr +#undef strtok_r char* strncpy(char *, const char *, size_t); void* plugin_get_buffer(size_t *buffer_size); diff --git a/apps/plugins/main_menu_config.c b/apps/plugins/main_menu_config.c index da9fde8384..554265a0bd 100644 --- a/apps/plugins/main_menu_config.c +++ b/apps/plugins/main_menu_config.c @@ -62,7 +62,7 @@ void load_from_cfg(void) rb->root_menu_write_to_cfg(NULL, config_str, sizeof(config_str)); - token = strtok_r(config_str, ", ", &save); + token = rb->strtok_r(config_str, ", ", &save); while (token) { @@ -78,7 +78,7 @@ void load_from_cfg(void) menu_items[done].enabled = true; done++; } - token = strtok_r(NULL, ", ", &save); + token = rb->strtok_r(NULL, ", ", &save); } if (done < menu_item_count) -- cgit v1.2.3