GCC使用glibc 2.30-8警告有关gettid()syscall包装器的信息>

问题描述 投票:0回答:1

man pageSO post#1 / SO post#2都表明gettid()在glibc 2.30中实现。根据ldd --version,我认为我正在使用GLIBC 2.30-8

,但gcc仍在抱怨-警告:函数'gettid'的隐式声明;你是说‘getgid’吗? [-Wimplicit函数声明]。我可以忽略该警告,程序可以正常运行。

我尝试与gettid()一起使用的标头是<sys/types.h>,在手册页之后。我错过了什么吗?

使用标题syscall(SYS_gettid)调用<sys/syscall.h>不会触发来自gcc的警告。

手册页和SO post#1 / SO post#2都表明gettid()是在glibc 2.30中实现的。根据ldd --version,我认为我正在使用GLIBC 2.30-8,但gcc仍然抱怨-警告:隐式...

c linux system-calls glibc
1个回答
0
投票

发件人:man gettid

© www.soinside.com 2019 - 2024. All rights reserved.