Author: uwe Date: 2007-11-07 20:02:35 +0100 (Wed, 07 Nov 2007) New Revision: 2949
Modified: trunk/LinuxBIOSv2/src/include/stdlib.h trunk/LinuxBIOSv2/src/southbridge/via/vt8237r/vt8237r_early_smbus.c Log: 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
Modified: trunk/LinuxBIOSv2/src/include/stdlib.h =================================================================== --- trunk/LinuxBIOSv2/src/include/stdlib.h 2007-11-07 18:55:06 UTC (rev 2948) +++ trunk/LinuxBIOSv2/src/include/stdlib.h 2007-11-07 19:02:35 UTC (rev 2949) @@ -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 @@ typedef size_t malloc_mark_t; void malloc_mark(malloc_mark_t *place); void malloc_release(malloc_mark_t *place); +#endif
#endif /* STDLIB_H */
Modified: trunk/LinuxBIOSv2/src/southbridge/via/vt8237r/vt8237r_early_smbus.c =================================================================== --- trunk/LinuxBIOSv2/src/southbridge/via/vt8237r/vt8237r_early_smbus.c 2007-11-07 18:55:06 UTC (rev 2948) +++ trunk/LinuxBIOSv2/src/southbridge/via/vt8237r/vt8237r_early_smbus.c 2007-11-07 19:02:35 UTC (rev 2949) @@ -21,6 +21,7 @@
#include <device/pci_ids.h> #include <spd.h> +#include <stdlib.h> #include "vt8237r.h"
/**