作者共发了1篇帖子。 字体大小:较小 - 100% (默认)▼  内容转换:不转换▼
 
点击 回复
54 0
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

回复帖子

内容:
用户名: 您目前是匿名发表
验证码:
(快捷键:Ctrl+Enter)
 

本帖信息

点击数:54 回复数:0
评论数: ?
作者:巨大八爪鱼
最后回复:巨大八爪鱼
最后回复时间:2025-6-20 11:55
 
©2010-2025 Purasbar Ver2.0
除非另有声明,本站采用知识共享署名-相同方式共享 3.0 Unported许可协议进行许可。