嵌入式技术论坛
直播中

王尚岱

8年用户 1511经验值
擅长:电源/新能源
私信 关注
[问答]

mbedtls-v2.7.10.1编译报错怎么解决?

mbedtls-v2.7.10.1 编译报错 提示

compiling timing_alt.c...
packages\mbedtls-v2.7.10.1\ports\src\timing_alt.c(104): error: #20: identifier "SIGALRM" is undefined
signal( SIGALRM, sighandler );
packages\mbedtls-v2.7.10.1\ports\src\timing_alt.c: 0 warnings, 1 error
compiling tls_net.c...
packages\mbedtls-v2.7.10.1\ports\src\tls_net.c(298): warning: #223-D: function "fcntl" declared implicitly
if( ( fcntl( ctx->fd, F_GETFL) & O_NONBLOCK ) != O_NONBLOCK )
packages\mbedtls-v2.7.10.1\ports\src\tls_net.c(298): error: #20: identifier "F_GETFL" is undefined
if( ( fcntl( ctx->fd, F_GETFL) & O_NONBLOCK ) != O_NONBLOCK )
packages\mbedtls-v2.7.10.1\ports\src\tls_net.c(298): error: #20: identifier "O_NONBLOCK" is undefined
if( ( fcntl( ctx->fd, F_GETFL) & O_NONBLOCK ) != O_NONBLOCK )
packages\mbedtls-v2.7.10.1\ports\src\tls_net.c(467): error: #20: identifier "FIONBIO" is undefined
return (ioctlsocket(fd, FIONBIO, &n));
packages\mbedtls-v2.7.10.1\ports\src\tls_net.c(477): error: #20: identifier "FIONBIO" is undefined
return (ioctlsocket(fd, FIONBIO, &n));
packages\mbedtls-v2.7.10.1\ports\src\tls_net.c(527): error: #20: identifier "ECONNRESET" is undefined
if (
rrno == ECONNRESET)
packages\mbedtls-v2.7.10.1\ports\src\tls_net.c(529): error: #20: identifier "EINTR" is undefined
if(
rrno == EINTR )
packages\mbedtls-v2.7.10.1\ports\src\tls_net.c(578): error: #20: identifier "EINTR" is undefined
if(
rrno == EINTR )
packages\mbedtls-v2.7.10.1\ports\src\tls_net.c(612): error: #20: identifier "ECONNRESET" is undefined
if (
rrno == ECONNRESET)
packages\mbedtls-v2.7.10.1\ports\src\tls_net.c(614): error: #20: identifier "EINTR" is undefined
if(
rrno == EINTR )
packages\mbedtls-v2.7.10.1\ports\src\tls_net.c: 1 warning, 9 errors
BSP版本是master版本,打开signal.h查询确实没有这个定义,是需要增加那个头文件还是需要自己添加定义?

回帖(1)

fanB

2023-8-20 16:49:34
添加头文件

#include
#include
举报

更多回帖

发帖
×
20
完善资料,
赚取积分