提交 2f9bfcc6 编写于 作者: 星e雨's avatar 星e雨

fix: L0 GN compilation problem

Close: #I3ORHS
Change-Id: Ia105084336f2ba66f91546226a9383646a0148ce
上级 1f725147
......@@ -29,12 +29,11 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define _GNU_SOURCE 1
#include "ff.h"
#if FF_USE_EXPAND
#define _GNU_SOURCE
#endif
#include "fatfs.h"
#include "errno.h"
#include "stdbool.h"
#include "limits.h"
#include "pthread.h"
#include "time.h"
......
......@@ -19,6 +19,7 @@ extern "C" {
#define __NEED_mbstate_t
#if __STDC_VERSION__ < 201112L
#define __NEED_off_t
#define __NEED_struct__IO_FILE
#endif
......
......@@ -490,6 +490,16 @@ LITE_OS_SEC_TEXT_INIT VOID HalExcHandleEntry(UINT32 excType, UINT32 faultAddr, U
HalSysExit();
}
/* stack protector */
WEAK UINT32 __stack_chk_guard = 0xd00a0dff;
WEAK VOID __stack_chk_fail(VOID)
{
/* __builtin_return_address is a builtin function, building in gcc */
LOS_Panic("stack-protector: Kernel stack is corrupted in: %p\n",
__builtin_return_address(0));
}
/* ****************************************************************************
Function : HalHwiInit
Description : initialization of the hardware interrupt
......
......@@ -62,6 +62,11 @@ typedef VOID (*HWI_PROC_FUNC)(VOID *parm);
typedef VOID (*HWI_PROC_FUNC)(void);
#endif
/* stack protector */
extern UINT32 __stack_chk_guard;
extern VOID __stack_chk_fail(VOID);
UINT32 HalIsIntActive(VOID);
#define OS_INT_ACTIVE (HalIsIntActive())
#define OS_INT_INACTIVE (!(OS_INT_ACTIVE))
......
......@@ -31,6 +31,7 @@ static_library("utils") {
sources = [
"los_debug.c",
"los_error.c",
"los_hook.c",
]
include_dirs = [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册