This patch masks the function prototypes in stdlib.h from ROMCC, so that
ARRAY_SIZE() can be used on ROMCC-dependent systems. Also adds stdlib.h to vt8237r_early_smbus.c, so it'll build on those systems. Signed-off-by: Corey Osgood <corey.osgood@gmail.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2949 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
c9f8a67139
commit
908ff5ecac
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||||
|
|
||||||
|
#ifndef __ROMCC__
|
||||||
extern void *malloc(size_t size);
|
extern void *malloc(size_t size);
|
||||||
void free(void *ptr);
|
void free(void *ptr);
|
||||||
|
|
||||||
|
@ -12,5 +13,6 @@ void free(void *ptr);
|
||||||
typedef size_t malloc_mark_t;
|
typedef size_t malloc_mark_t;
|
||||||
void malloc_mark(malloc_mark_t *place);
|
void malloc_mark(malloc_mark_t *place);
|
||||||
void malloc_release(malloc_mark_t *place);
|
void malloc_release(malloc_mark_t *place);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* STDLIB_H */
|
#endif /* STDLIB_H */
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#include <device/pci_ids.h>
|
#include <device/pci_ids.h>
|
||||||
#include <spd.h>
|
#include <spd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include "vt8237r.h"
|
#include "vt8237r.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue