From 572c00fb747590967b23358bce5baf4d8289756d Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 13 Mar 2018 15:45:55 +0100 Subject: [PATCH] Added missing strcat function. --- Makefile | 2 +- c_functions/missing.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 c_functions/missing.c diff --git a/Makefile b/Makefile index 61ef537..1b7c0ee 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ ESPTOOLOPTS = -ff 40m -fm dio -fs 32m TARGET = app # which modules (subdirectories) of the project to include in compiling -MODULES = driver user easygpio +MODULES = driver user easygpio c_functions EXTRA_INCDIR = include $(BUILD_AREA)/esp-open-sdk/esp-open-lwip/include #EXTRA_INCDIR = include diff --git a/c_functions/missing.c b/c_functions/missing.c new file mode 100644 index 0000000..8688acb --- /dev/null +++ b/c_functions/missing.c @@ -0,0 +1,21 @@ +#include "c_types.h" +#include "mem.h" +#include "ets_sys.h" +#include "osapi.h" +#include "gpio.h" +#include "os_type.h" + +char *_strcat(char *dest, const char *src) +{ + size_t i, j; + for (i = 0; dest[i] != '\0'; i++); + + for (j = 0; src[j] != '\0'; j++) + { + dest[i + j] = src[j]; + } + + dest[i + j] = '\0'; + + return dest; +}