summaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-21 16:27:32 -0700
committerCommit Bot <commit-bot@chromium.org>2020-12-24 00:01:32 +0000
commitbab787e065cac46be3a3070b4060741108601475 (patch)
tree3c7d60c804eb203b0bf3c7bebb068c4ae6fbf4e6 /include/util.h
parentda9bdddf31d1280e8dccf801c4fabf1d33478db3 (diff)
downloadchrome-ec-bab787e065cac46be3a3070b4060741108601475.tar.gz
zephyr: Avoid duplicate definition of GENMASK, etc.
These two macros are defined by Zephyr after this header is included. Avoid this with an #ifdef. BUG=b:175434113 BRANCH=none TEST=build zephyr for volteer Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Iaa802de3e49bbdbb68bf9044be28a93bd095c7de Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2600227 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h
index 3d788d01cb..2be43bddfb 100644
--- a/include/util.h
+++ b/include/util.h
@@ -95,11 +95,17 @@ extern "C" {
/* Standard library functions */
int atoi(const char *nptr);
+
+#ifdef CONFIG_ZEPHYR
+#include <ctype.h>
+#else
int isdigit(int c);
int isspace(int c);
int isalpha(int c);
int isupper(int c);
int isprint(int c);
+#endif
+
int memcmp(const void *s1, const void *s2, size_t len);
void *memcpy(void *dest, const void *src, size_t len);
void *memset(void *dest, int c, size_t len);