Ilya Zakharevich on Sun, 05 Aug 2018 15:44:43 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[BUG 2.3.0–CURRENT] input_method conflicts with -D_FORTIFY_SOURCE=2

For reference, see
Clicking on yellow NetBSD rectanges leads to reports like this one:
which gives

  cc -c -I pari-2.3.5/src -I pari-2.3.5/src/headers -I pari-2.3.5/src -I ./libPARI  -I ../pari-2.3.5/src -I ../pari-2.3.5/src/headers -I ../pari-2.3.5/src/graph -I .  -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/pkg/include -D_FORTIFY_SOURCE=2 -O    -DVERSION=\"\"  -DXS_VERSION=\"\" -DPIC -fPIC -DPLOT_IS_TUNABLE -Derr=pari_err -DHAS_STAT -DHAS_OPENDIR -DASMINLINE -DGCC_INLINE -DDYNAMIC_PLOTTING -o es.o ../pari-2.3.5/src/language/es.c
  ../pari-2.3.5/src/language/es.c: In function 'file_input':
  ../pari-2.3.5/src/language/es.c:312:13: error: 'input_method' has no member named '__fgets_chk'
  *** Error code 1


Morale: using a field ->fgets which is a function pointer is not compatoble with -D_FORTIFY_SOURCE=2.
	       shows that it is still the same now.


Possible solution: change fgets to do_fgets.

Hope this helps,