aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Homescu <ahomescu@google.com>2023-04-13 00:51:50 +0000
committerAndrei Homescu <ahomescu@google.com>2023-04-13 00:53:00 +0000
commit45845c6e5070e25a8661a721985e3f49aa63f6aa (patch)
tree5dbc1a15d0e78d9957a9581462cc8f69886852f8
parent1ef4bc98046c1c3ef184d36837ae136160243fdc (diff)
downloadcommon-45845c6e5070e25a8661a721985e3f49aa63f6aa.tar.gz
lib/libc: Add missing internal stdlib.h include to atoi.c
atoi.c assumes the lk libc version of stdlib.h has been included. That was no longer the case after switching to musl, so include it explicitly from that source file. Bug: 230134581 Change-Id: I780f3f690645bcdfc75a53bd71da3e8b682f6467
-rw-r--r--lib/libc/atoi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/atoi.c b/lib/libc/atoi.c
index 8f334c85..27a5e7cd 100644
--- a/lib/libc/atoi.c
+++ b/lib/libc/atoi.c
@@ -29,6 +29,12 @@
#include <ctype.h>
#include <errno.h>
+/*
+ * Include our own stdlib.h which contains the definitions
+ * for all functions in this file
+ */
+#include "include/stdlib.h"
+
#define LONG_IS_INT 1
static int hexval(char c)