summaryrefslogtreecommitdiff
path: root/zephyr/shim/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/shim/src/util.c')
-rw-r--r--zephyr/shim/src/util.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/zephyr/shim/src/util.c b/zephyr/shim/src/util.c
new file mode 100644
index 0000000000..998a0db01d
--- /dev/null
+++ b/zephyr/shim/src/util.c
@@ -0,0 +1,14 @@
+/* Copyright 2020 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include <common.h>
+#include <stdlib.h>
+
+/* Int and Long are same size, just forward to existing Long implementation */
+int strtoi(const char *nptr, char **endptr, int base)
+{
+ return strtol(nptr, endptr, base);
+}
+BUILD_ASSERT(sizeof(int) == sizeof(long));