우분투 20.04 bison patch

아래 에러는 m4 동일하게 GCC7으로 빌드해서 발생하는 문제이다.

| gcc     -I. -I./lib -I../bison-3.0.4 -I../bison-3.0.4/lib -isystem/media/gon/proj/RDK/temp/build-raspberrypi-rdk-hybrid/tmp/sysroots/x86_64-linux/usr/include  -isystem/media/gon/proj/RDK/temp/build-raspberrypi-rdk-hybrid/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -c -o lib/isnanf.o ../bison-3.0.4/lib/isnanf.c
| ../bison-3.0.4/lib/fseterr.c: In function 'fseterr':
| ../bison-3.0.4/lib/fseterr.c:77:3: error: #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
|    77 |  #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
|       |   ^~~~~
| make[2]: *** [Makefile:3366: lib/fseterr.o] Error 1

_IO_ftrylockfile 옵션을 _IO_EOF_SEEN으로 변경하면 쉽게 해결된다.

--- bison-3.0.4_old/lib/fseterr.c	2015-01-05 01:43:50.000000000 +0900
+++ bison-3.0.4_new/lib/fseterr.c	2020-10-30 15:43:17.017000340 +0900
@@ -29,7 +29,7 @@
   /* Most systems provide FILE as a struct and the necessary bitmask in
      <stdio.h>, because they need it for implementing getc() and putc() as
      fast macros.  */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
   fp->_flags |= _IO_ERR_SEEN;
 #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   fp_->_flags |= __SERR;