Skip to content
Snippets Groups Projects
Commit 8d2e5ad7 authored by Rainer Orth's avatar Rainer Orth
Browse files

ada: Fix Ada bootstrap on FreeBSD

Ada bootstrap on FreeBSD/amd64 was also broken by the recent warning
changes:

terminals.c: In function 'allocate_pty_desc':
terminals.c:1200:12: error: implicit declaration of function 'openpty'; did you
mean 'openat'? [-Wimplicit-function-declaration]
 1200 |   status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
      |            ^~~~~~~
      |            openat

terminals.c: At top level:
terminals.c:1268:9: warning: "TABDLY" redefined
 1268 | #define TABDLY 0
      |         ^~~~~~
In file included from /usr/include/termios.h:38,
                 from terminals.c:1109:
/usr/include/sys/_termios.h:111:9: note: this is the location of the previous definition
  111 | #define TABDLY          0x00000004      /* tab delay mask */
      |         ^~~~~~
make[7]: *** [../gcc-interface/Makefile:302: terminals.o] Error 1

Fixed by including the necessary header and guarding the fallback
definition of TABDLY.

This allowed a 64-bit-only bootstrap on x86_64-unknown-freebsd14.0 to
complete successfully.

2023-12-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/ada:
	* terminals.c [__FreeBSD__]: Include <libutil.h>.
	(TABDLY): Only define if missing.
parent 0a569f87
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment