最近在編 Buildroot 碰到這樣的 compile error.
extra/scripts/unifdef.c:209: error: conflicting types for ‘getline’
/usr/include/stdio.h:651: error: previous declaration of ‘getline’ was here
make[1]: *** [extra/scripts/unifdef] Error 1
make[1]: Leaving directory `/home2/richliu/1/buildroot-2009.05/toolchain_build_arm/uClibc-0.9.30.1′
make: *** [/home2/richliu/1/buildroot-2009.05/toolchain_build_arm/uClibc-0.9.30.1/.configured] Error 2
主因是 glibc 新版內, getline 是一個內建 function, 如果程式內也有用到, compile 就會出問題
這邊有 Patch File .
1 則自動引用通知