From c7c4a2787bae1a3eb239f5e69826727ff5c44373 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Thu, 22 Oct 2020 18:12:25 +0100 Subject: [PATCH] Darwin, Ada : Fix bootstrap after stat entry changes. Darwin struct stat has timeval entry fields for file access and modification times but they are named differently from those on Linux. As a workaround define the field names to the Darwin equivalent. gcc/ada/ChangeLog: * adaint.c: On Darwin platforms, define st_atim to st_atimespec. Likwise st_mtim to st_mtimespec. --- gcc/ada/adaint.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index b7406a03c31..560f3529442 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -237,6 +237,11 @@ UINT __gnat_current_ccs_encoding; #include "adaint.h" +#if defined (__APPLE__) && defined (st_mtime) +#define st_atim st_atimespec +#define st_mtim st_mtimespec +#endif + /* Define symbols O_BINARY and O_TEXT as harmless zeroes if they are not defined in the current system. On DOS-like systems these flags control whether the file is opened/created in text-translation mode (CR/LF in -- 2.30.2