Include stdlib in fontutils (#11251)

When `REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER` is defined and Re-ARM build is attempted, `u8g_fontutf8.cpp` includes `fontutils.h` which uses `abs()`.

However, `abs()` is defined in `stdlib.h` which is not included in `fontutils.h`, so compile fails with an error.

Include `stdlib.h` in `fontutils.h` so that `abs()` is defined before `u8g_fontutf8.cpp` needs to use it, resolving the compile error.

Signed-off-by: Jamie Bainbridge <jamie.bainbridge@gmail.com>
This commit is contained in:
Jamie Bainbridge 2018-07-13 15:02:38 +10:00 committed by Scott Lahteine
parent fed68f29af
commit 8c57cadbe7

View file

@ -9,6 +9,7 @@
#ifndef _FONT_UTILS_H #ifndef _FONT_UTILS_H
#define _FONT_UTILS_H #define _FONT_UTILS_H
#include <stdlib.h>
#include <Arduino.h> #include <Arduino.h>
#include "../core/macros.h" #include "../core/macros.h"
#include <stddef.h> // wchar_t #include <stddef.h> // wchar_t