目前共有1篇帖子。 字體大小:較小 - 100% (默認)▼  內容轉換:不轉換▼
 
點擊 回復
51 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)
 

本帖信息

點擊數:51 回複數:0
評論數: ?
作者:巨大八爪鱼
最後回復:巨大八爪鱼
最後回復時間:2025-6-20 11:55
 
©2010-2025 Purasbar Ver2.0
除非另有聲明,本站採用創用CC姓名標示-相同方式分享 3.0 Unported許可協議進行許可。