https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119975
--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> --- > commit r16-1193-g2e334900f4ddcd804e3b324402544a572d306ab6 > Author: Robert Dubner <rdub...@symas.com> > Date: Thu Jun 5 10:53:02 2025 -0400 > > cobol: Guard clock_gettime(). [PR119975] > > This attempts to eliminate "'clock_gettime' not declared..." when > building on x86_64-apple-darwin15.6.0. Calls to clock_gettime have been > reduced to two locations. Both have been guarded with This patch allowed cobol1 to build on Darwin 15 now, thanks. However, libgcobol still doesn't build: In file included from /vol/gcc/src/hg/master/darwin/libgcobol/gfileio.cc:53: /vol/gcc/src/hg/master/darwin/libgcobol/libgcobol.h:115:17: error: variable or field '__gg__clock_gettime' declared void 115 | extern "C" void __gg__clock_gettime(clockid_t clk_id, struct cbl_timespec *tp); | ^~~~~~~~~~~~~~~~~~~ /vol/gcc/src/hg/master/darwin/libgcobol/libgcobol.h:115:37: error: 'clockid_t' was not declared in this scope; did you mean 'clock_t'? 115 | extern "C" void __gg__clock_gettime(clockid_t clk_id, struct cbl_timespec *tp); | ^~~~~~~~~ | clock_t There's no clockid_t without clock_gettime. Besides, there are several instances of /vol/gcc/src/hg/master/darwin/libgcobol/intrinsic.cc: In function 'void __gg__current_date(cblc_field_t*)': /vol/gcc/src/hg/master/darwin/libgcobol/intrinsic.cc:1222:23: error: 'CLOCK_REALTIME' was not declared in this scope 1222 | __gg__clock_gettime(CLOCK_REALTIME, &tp); // time_t tv_sec; long tv_nsec | ^~~~~~~~~~~~~~ which cannot work either. And there's also an unguarded call to clock_gettime in __gg__clock_gettime.