Thomas Heijligen has uploaded this change for review.

View Change

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.

To view, visit change 30844. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I85738a7c7c2f4b0be9b1624b34c478ecdfbb25ed
Gerrit-Change-Number: 30844
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Heijligen <src@posteo.de>
Gerrit-MessageType: newchange