diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2009-07-19 00:18:15 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2009-07-19 00:18:15 +0000 |
commit | 951f5882e2a713db33c99f93f5730223269e8199 (patch) | |
tree | c081612801684e13f9a3f43fdf17358fcf6533fd /src/include | |
parent | 0c88655b0321da7a4ac5b1337605aaa3d7366a1e (diff) | |
download | coreboot-staging-951f5882e2a713db33c99f93f5730223269e8199.zip coreboot-staging-951f5882e2a713db33c99f93f5730223269e8199.tar.gz |
The file string.h is also included in romcc code, which has no malloc().
The patch adds proper preprocessor guards and drops the malloc() prototype
because that's in stdlib.h
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4441 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/string.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/string.h b/src/include/string.h index d82b3ac..c7902e1 100644 --- a/src/include/string.h +++ b/src/include/string.h @@ -8,7 +8,6 @@ void *memcpy(void *dest, const void *src, size_t n); void *memmove(void *dest, const void *src, size_t n); void *memset(void *s, int c, size_t n); int memcmp(const void *s1, const void *s2, size_t n); -void *malloc(size_t size); int sprintf(char * buf, const char *fmt, ...); // yes, linux has fancy ones. We don't care. This stuff gets used @@ -45,6 +44,7 @@ static inline char *strchr(const char *s, int c) return 0; } +#ifndef __ROMCC__ static inline char *strdup(const char *s) { size_t sz = strlen(s) + 1; @@ -52,6 +52,7 @@ static inline char *strdup(const char *s) memcpy(d, s, sz); return d; } +#endif static inline char *strncpy(char *to, const char *from, int count) { |