[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/build/uClibc/libc/stdlib/getenv.c b/ap/build/uClibc/libc/stdlib/getenv.c
new file mode 100644
index 0000000..d5db178
--- /dev/null
+++ b/ap/build/uClibc/libc/stdlib/getenv.c
@@ -0,0 +1,30 @@
+/* getenv.c for uClibc
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+
+/* IEEE Std 1003.1-2001 says getenv need not be thread safe, so
+ * don't bother locking access to __environ */
+char *getenv(const char *var)
+{
+    int len;
+    char **ep;
+
+    if (!(ep=__environ))
+	return NULL;
+    len = strlen(var);
+    while(*ep) {
+	if (memcmp(var, *ep, len) == 0 && (*ep)[len] == '=') {
+	    return *ep + len + 1;
+	}
+	ep++;
+    }
+    return NULL;
+}
+libc_hidden_def(getenv)