【问题描述】
鲲鹏环境编译fio安装过程报error: static declaration of ‘gettid’ follows non-static declaration错误, 详细报错如下:
os/os-linux.h:108:19: error: static declaration of ‘gettid’ follows non-static declaration
108 | static inline int gettid(void)
| ^~~~~~
In file included from /usr/include/unistd.h:1204,
from gettime.c:5:
/usr/include/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here
34 | extern __pid_t gettid (void) __THROW;
| ^~~~~~
make: *** [Makefile:225: gettime.o] Error 1
ERROR: excute "make" failed, please check it.

【解决方法】
修改os/os-linux.h文件
将第108行的 static inline int gettid(void)
修改为 static inline int sys_gettid(void)

再次执行make编译即正常编译通过。
【问题描述】
鲲鹏环境编译fio安装过程报error: static declaration of ‘gettid’ follows non-static declaration错误, 详细报错如下:
os/os-linux.h:108:19: error: static declaration of ‘gettid’ follows non-static declaration
108 | static inline int gettid(void)
| ^~~~~~
In file included from /usr/include/unistd.h:1204,
from gettime.c:5:
/usr/include/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here
34 | extern __pid_t gettid (void) __THROW;
| ^~~~~~
make: *** [Makefile:225: gettime.o] Error 1
ERROR: excute "make" failed, please check it.
【解决方法】
修改os/os-linux.h文件
将第108行的 static inline int gettid(void)
修改为 static inline int sys_gettid(void)
再次执行make编译即正常编译通过。