提交 61a91e9b 编写于 作者: L lnlan

feat: curl\mbedtls适配m核

【背景】
m核应用对curl\mbedtls有需求。

【修改方案】
1. BUILD.gn调整,添加m核适配内容
2. 添加适配m核配置文件,编译时覆盖默认配置
3. 修复NULL重定义问题
4. 内核posix新增stdin.c,修复缺少stdin定义问题
【影响】
对现有的产品编译不会有影响

re #I3ULAS
Signed-off-by: Nlanleinan <lanleinan@163.com>
Change-Id: I4b471626e0204fc108d3c10a48bdd691a7e629d8
上级 070d3c2f
...@@ -91,8 +91,11 @@ defines = [] ...@@ -91,8 +91,11 @@ defines = []
config("mbedtls_config") { config("mbedtls_config") {
include_dirs = [ "./include", "./include/mbedtls" ] include_dirs = [ "./include", "./include/mbedtls" ]
if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "liteos_a") { if (ohos_kernel_type == "liteos_m") {
defines += [ "__unix__" ] defines += [ "__unix__", "MBEDTLS_CONFIG_FILE=<../port/config/config_liteos_m.h>" ]
}
if (ohos_kernel_type == "liteos_a") {
defines += [ "__unix__", "MBEDTLS_CONFIG_FILE=<../port/config/config_liteos_a.h>" ]
} }
} }
...@@ -140,6 +143,9 @@ if (ohos_build_type == "debug") { ...@@ -140,6 +143,9 @@ if (ohos_build_type == "debug") {
"./configs", # The directory where the custom configuration file is "./configs", # The directory where the custom configuration file is
# located # located
] ]
if (ohos_kernel_type == "liteos_m") {
include_dirs = [ "//kernel/liteos_m/kal/posix/include" ]
}
defines = [ defines = [
"MBEDTLS_CONFIG_FILE=<config_rsa_aes_cbc.h>", "MBEDTLS_CONFIG_FILE=<config_rsa_aes_cbc.h>",
"__unix__", "__unix__",
......
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册