openEuler release 22.03 LTS上编译报错“error: static declaration of ‘gettid’ follows non-static declaration”

openEuler release 22.03 LTS上,编译fio工具时,报错“error: static declaration of ‘gettid’ follows non-static declaration”
怀疑与系统内的库及函数gettid冲突,如下。

请问,该问题是否有解决方式,谢谢!!

[root@test166 fio-fio-3.3]# make
CC crc/crc16.o
CC crc/crc32.o
CC crc/crc32c-arm64.o
CC crc/crc32c-intel.o
CC crc/crc32c.o
CC crc/crc64.o
CC crc/crc7.o
CC crc/fnv.o
CC crc/md5.o
CC crc/murmur3.o
CC crc/sha1.o
CC crc/sha256.o
CC crc/sha3.o
In file included from crc/…/os/os.h:33,
from crc/sha3.c:18:
crc/…/os/os-linux.h:124:19: error: static declaration of ‘gettid’ follows non-static declaration
124 | static inline int gettid(void)
| ^~~~~~
In file included from /usr/include/unistd.h:1204,
from crc/…/os/os.h:8,
from crc/sha3.c:18:
/usr/include/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here
34 | extern __pid_t gettid (void) __THROW;
| ^~~~~~
make: *** [Makefile:329: crc/sha3.o] Error 1

[root@test166 fio-fio-3.3]# cat /etc/*release
openEuler release 22.03 LTS
NAME=“openEuler”

1 个赞