libfaketime icon indicating copy to clipboard operation
libfaketime copied to clipboard

define of gettimeofday conflict with sys files,on linux kylin arm aarch64

Open enderwsp opened this issue 1 year ago • 1 comments

only change to a different name,then will be make install successfulIMG_20240913_161914.jpgly

enderwsp avatar Sep 13 '24 08:09 enderwsp

原因: 头文件中的定义是:int gettimeofday(struct timeval *tv, struct timezone *tz) 函数中的定义是:int gettimeofday(struct timeval *tv, void *tz) 特定版本的C语言要求函数声明必须完全一致,否则编译检查过不去。 解决方法: 将 libfaketime.c 中的定义改为与系统头文件的一致即可。 修改libfaketime.c第2222行的代码:将参数void *tz 改为 struct timezone *tz 然后重新编译即可。

LalexH avatar Apr 28 '25 09:04 LalexH