The xfrpc project is a lightweight implementation of the FRP client written in C language for OpenWRT and IoT systems. It is designed to provide an efficient solution for resource-constrained devices such as OpenWRT routers and IoT devices, which often have limited ROM and RAM space.
GNU General Public License v3.0
724
stars
92
forks
source link
A 32bit cpu incompatibility problem about timestamp. #52
在login.h文件中的结构体login 中的timestamp成员定义为long int类型,在32位架构CPU中,该类型为4 bytes。在msg.c文件的
login_request_marshal
函数中调用JSON_MARSHAL_TYPE(j_login_req, "timestamp", int64, lg->timestamp);
。int64类型是8 bytes。存在兼容性问题。 建议使用time_t类型,然后根据sizeof(time_t)来选择传入的是int64还是int。cJOSN就做的很好,直接使用double存所有的数字。