소스 검색

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>
Jamie Bainbridge 7 년 전
부모
커밋
8c57cadbe7
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1
    0
      Marlin/src/lcd/fontutils.h

+ 1
- 0
Marlin/src/lcd/fontutils.h 파일 보기

9
 #ifndef _FONT_UTILS_H
9
 #ifndef _FONT_UTILS_H
10
 #define _FONT_UTILS_H
10
 #define _FONT_UTILS_H
11
 
11
 
12
+#include <stdlib.h>
12
 #include <Arduino.h>
13
 #include <Arduino.h>
13
 #include "../core/macros.h"
14
 #include "../core/macros.h"
14
 #include <stddef.h> // wchar_t
15
 #include <stddef.h> // wchar_t

Loading…
취소
저장