Thomas Heijligen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30844
Change subject: string.h: allow to compile strdup in romstage ......................................................................
string.h: allow to compile strdup in romstage
Allows to use ramstage compilation units in romstage as long as strdup isn't called in romstage.
Change-Id: I85738a7c7c2f4b0be9b1624b34c478ecdfbb25ed Signed-off-by: Thomas Heijligen thomas.heijligen@secunet.com --- M src/include/string.h 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/30844/1
diff --git a/src/include/string.h b/src/include/string.h index fc96393..b692de9 100644 --- a/src/include/string.h +++ b/src/include/string.h @@ -51,7 +51,7 @@ return 0; }
-#if !defined(__PRE_RAM__) +//#if !defined(__PRE_RAM__) static inline char *strdup(const char *s) { size_t sz = strlen(s) + 1; @@ -69,7 +69,7 @@ memcpy(d + sz_1, s2, sz_2 + 1); return d; } -#endif +//#endif
/** * Find a character in a string.