設置 | 登錄 | 註冊

目前共有1篇帖子。

fedora42编译ntp-4.2.8p18时,提示configure: error: could not locate pthread_detach。

1樓 巨大八爪鱼 2025-6-20 11:55
conftest.c: In function 'main':
conftest.c:180:16: error: passing argument 1 of 'pthread_detach' makes integer from pointer without a cast [-Wint-conversion]
  180 | pthread_detach(NULL);
      |                ^~~~
      |                |
      |                void *
In file included from conftest.c:172:
/home/oct1158/Downloads/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-linux-gnueabihf/lib/gcc/arm-none-linux-gnueabihf/14.2.1/include-fixed/pthread.h:278:38: note: expected 'pthread_t' {aka 'long unsigned int'} but argument is of type 'void *'
  278 | extern int pthread_detach (pthread_t __th) __THROW;
      |
    
解决方案:
修改configure文件,找到第23134行的pthread_detach(NULL),改成pthread_detach(0)。
sntp/configure的第13735行也要做同样的修改。

参考资料:https://bugs.gentoo.org/871372

內容轉換:

回覆帖子
內容:
用戶名: 您目前是匿名發表。
驗證碼:
看不清?換一張
©2010-2025 Purasbar Ver3.0 [手機版] [桌面版]
除非另有聲明,本站採用知識共享署名-相同方式共享 3.0 Unported許可協議進行許可。