summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCorey Osgood <corey.osgood@gmail.com>2007-11-07 19:02:35 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2007-11-07 19:02:35 +0000
commit908ff5ecac9065e4c903ae37c70e35d6aaf20108 (patch)
treeea2246e359fb0ca1cab0bfa290c2b0e1c8e84821 /src
parentc9f8a67139e60cc0c36190b8801935698f3d00c8 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/include/stdlib.h2
-rw-r--r--src/southbridge/via/vt8237r/vt8237r_early_smbus.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/include/stdlib.h b/src/include/stdlib.h
index 8bae40f2e1..1fa8e24d18 100644
--- a/src/include/stdlib.h
+++ b/src/include/stdlib.h
@@ -5,6 +5,7 @@
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+#ifndef __ROMCC__
extern void *malloc(size_t size);
void free(void *ptr);
@@ -12,5 +13,6 @@ void free(void *ptr);
typedef size_t malloc_mark_t;
void malloc_mark(malloc_mark_t *place);
void malloc_release(malloc_mark_t *place);
+#endif
#endif /* STDLIB_H */
diff --git a/src/southbridge/via/vt8237r/vt8237r_early_smbus.c b/src/southbridge/via/vt8237r/vt8237r_early_smbus.c
index 8922188a70..bbc2daa3d4 100644
--- a/src/southbridge/via/vt8237r/vt8237r_early_smbus.c
+++ b/src/southbridge/via/vt8237r/vt8237r_early_smbus.c
@@ -21,6 +21,7 @@
#include <device/pci_ids.h>
#include <spd.h>
+#include <stdlib.h>
#include "vt8237r.h"
/**