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:
committed by
Stefan Reinauer
parent
bda29314c2
commit
7b769126d0
@@ -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;
|
||||
|
Reference in New Issue
Block a user