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:
Corey Osgood 2007-11-07 19:02:35 +00:00 committed by Uwe Hermann
parent c9f8a67139
commit 908ff5ecac
2 changed files with 3 additions and 0 deletions

View File

@ -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 */

View File

@ -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"
/** /**