From: Iain Sandoe Date: Thu, 22 Oct 2020 17:12:25 +0000 (+0100) Subject: Darwin, Ada : Fix bootstrap after stat entry changes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7c4a2787bae1a3eb239f5e69826727ff5c44373;p=gcc.git 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. --- 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