From c55c2ac8db2a6447db4dd6fa8ad5c2b2ebcba298 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Fri, 1 Dec 2023 16:47:28 +0100 Subject: ada: Fix Ada bootstrap on macOS The recent warning changes broke Ada bootstrap on macOS: adaint.c: In function '__gnat_copy_attribs': adaint.c:3336:10: error: implicit declaration of function 'utimes'; did you mean 'utime'? [-Wimplicit-function-declaration] 3336 | if (utimes (to, tbuf) == -1) { | ^~~~~~ | utime adaint.c: In function '__gnat_kill': adaint.c:3597:3: error: implicit declaration of function 'kill' [-Wimplicit-function-declaration] 3597 | kill (pid, sig); | ^~~~ terminals.c: In function 'allocate_pty_desc': terminals.c:1196:12: error: implicit declaration of function 'openpty'; did you mean 'openat'? [-Wimplicit-function-declaration] 1196 | status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL); | ^~~~~~~ | openat terminals.c: In function '__gnat_setup_winsize': terminals.c:1392:6: error: implicit declaration of function 'kill' [-Wimplicit-function-declaration] 1392 | kill (desc->child_pid, SIGWINCH); | ^~~~ This patch fixes this by including the necessary headers: for utimes, for kill, and for openpty. With those changes, the build completed on x86_64-apple-darwin2[0-3] (make check still running). 2023-12-01 Rainer Orth gcc/ada: * adaint.c [__APPLE__]: Include , . * terminals.c [!_WIN32]: Include . [__APPLE__]: Include . Fix typos. --- gcc/ada/adaint.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/ada/adaint.c') diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 9bb3054..cbff393 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -85,6 +85,8 @@ #if defined (__APPLE__) #include +#include +#include #include #endif -- cgit v1.1