掌機 - TRIMUI - 解決Please port gnulib freadahead.c to your platform問題



參考資訊:
https://blog.csdn.net/Jun626/article/details/104870430

問題如下:

make[3]: Entering directory 'output/build/host-m4-1.4.17/lib'
/usr/bin/gcc  -I.   -I/var/lib/trimui-toolchain//usr/include  -O2 -I/var/lib/trimui-toolchain//usr/include -c -o glthread/lock.o glthread/lock.c
/usr/bin/gcc  -I.   -I/var/lib/trimui-toolchain//usr/include  -O2 -I/var/lib/trimui-toolchain//usr/include -c -o freadahead.o freadahead.c
freadahead.c: In function 'freadahead':
freadahead.c:91:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
  #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
   ^~~~~
make[3]: *** [Makefile:1842: freadahead.o] Error 1
make[3]: Leaving directory 'output/build/host-m4-1.4.17/lib'
make[2]: *** [Makefile:1602: all] Error 2
make[2]: Leaving directory 'output/build/host-m4-1.4.17/lib'
make[1]: *** [Makefile:1506: all-recursive] Error 1
make[1]: Leaving directory 'output/build/host-m4-1.4.17'
make: *** [Makefile:1461: all] Error 2

解法如下:

$ output/build/host-m4-1.4.17
$ sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
$ echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h
$ make