bayou compile fixes

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5468 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer
2010-04-20 23:04:46 +00:00
committed by Stefan Reinauer
parent bda29314c2
commit 7b769126d0
6 changed files with 2683 additions and 25 deletions

View File

@@ -66,6 +66,20 @@ static struct {
{NULL},
};
#ifndef __LINUX__
static char *strndup (const char *s, size_t n)
{
size_t len = strlen (s);
len = (len<n)?len:n;
char *cpy = malloc (len + 1);
if (cpy == NULL)
return NULL;
cpy[len] = '\0';
memcpy (cpy, s, len);
return cpy;
}
#endif
static struct pentry *newPayload(struct config *config)
{
struct pentry **tmp, *ret;