litex/software/libbase/environ.c
whitequark 24463a168a Add a stub getenv() implementation.
This is not strictly necessary to build libunwind (it can
be built with -DNDEBUG), but it will be handy while it is
debugged.

It can be removed afterwards.
2015-07-26 12:55:52 +03:00

11 lines
230 B
C

#include <stdlib.h>
#include <string.h>
char *getenv(const char *varname) {
if(!strcmp(varname, "LIBUNWIND_PRINT_APIS") ||
!strcmp(varname, "LIBUNWIND_PRINT_UNWINDING")) {
return "1";
} else {
return NULL;
}
}