Paul Menzel (paulepanter@users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6672
-gerrit
commit 3fc82e0bf658da9098b249ac5f4993f64b4f69cb Author: Paul Menzel paulepanter@users.sourceforge.net Date: Fri Aug 15 10:27:58 2014 +0200
google/link, lenovo/x60: Include `stdlib.h` for macro `ARRAY_SIZE`
Fix up commit 4c960d4e (google/link, lenovo/x60: i915io.c: Use define `ARRAY_SIZE`) [1] breaking the build with native graphics initialization. The error for the Lenovo X60 is as follows.
CC mainboard/lenovo/x60/i915io.ramstage.o src/mainboard/lenovo/x60/i915io.c:2273:1: error: implicit declaration of function ‘ARRAY_SIZE’ [-Werror=implicit-function-declaration] src/mainboard/lenovo/x60/i915io.c:2273:1: error: initializer element is not constant cc1: all warnings being treated as errors make: *** [build/mainboard/lenovo/x60/i915io.ramstage.o] Fehler 1
Including the header `stdlib.h` with the define for the macro `ARRAY_SIZE` fixes the build issue.
[1] http://review.coreboot.org/5936
Change-Id: I6b74df8e19c1492927c1fb023367d9d8b4afdd29 Signed-off-by: Paul Menzel paulepanter@users.sourceforge.net --- src/mainboard/google/link/i915io.c | 1 + src/mainboard/lenovo/x60/i915io.c | 1 + 2 files changed, 2 insertions(+)
diff --git a/src/mainboard/google/link/i915io.c b/src/mainboard/google/link/i915io.c index abceb05..94adcba 100644 --- a/src/mainboard/google/link/i915io.c +++ b/src/mainboard/google/link/i915io.c @@ -18,6 +18,7 @@ */
#include <stdint.h> +#include <stdlib.h> #include "i915io.h"
struct iodef iodefs[] = { diff --git a/src/mainboard/lenovo/x60/i915io.c b/src/mainboard/lenovo/x60/i915io.c index b3c47b7..3b59040 100644 --- a/src/mainboard/lenovo/x60/i915io.c +++ b/src/mainboard/lenovo/x60/i915io.c @@ -18,6 +18,7 @@ */
#include <stdint.h> +#include <stdlib.h> #include "i915io.h"
struct iodef iodefs[] = {