[syslinux] [PATCH 10/21] stdlib.h: provide a stub definition for getenv()

Ferenc Wágner wferi at niif.hu
Tue Oct 15 11:03:38 PDT 2013


Which always returns NULL, representing an empty environment.
---
 com32/include/stdlib.h |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/com32/include/stdlib.h b/com32/include/stdlib.h
index 1441297..1d9f01b 100644
--- a/com32/include/stdlib.h
+++ b/com32/include/stdlib.h
@@ -45,7 +45,12 @@ __extern long long strtoll(const char *, char **, int);
 __extern unsigned long strtoul(const char *, char **, int);
 __extern unsigned long long strtoull(const char *, char **, int);
 
-__extern char *getenv(const char *);
+static __inline__ char *getenv(const char *name)
+{
+    (void)name;
+    return NULL;
+}
+
 __extern int putenv(const char *);
 __extern int setenv(const char *, const char *, int);
 __extern int unsetenv(const char *);
-- 
1.7.10.4



More information about the Syslinux mailing list