Opened 16 months ago

Last modified 16 months ago

#67888 reopened defect

blink @1.0.0: error: implicit declaration of function 'clock_gettime' is invalid in C99

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: herbygillot (Herby Gillot)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: elcapitan Cc:
Port: blink

Description

On El Capitan and earlier:

https://build.macports.org/builders/ports-10.11_x86_64-builder/builds/230272/steps/install-port/logs/stdio

./blink/timespec.h:11:13: error: implicit declaration of function 'clock_gettime' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  unassert(!clock_gettime(CLOCK_REALTIME, &ts));
            ^

legacysupport should help.

Change History (3)

comment:1 Changed 16 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 822c4f24f7678749d5fd2bc6f39ddc06ab992352/macports-ports (master):

blink: Use legacysupport for clock_gettime

Closes: #67888

comment:2 Changed 16 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: closedreopened

Unfortunately the build still fails, now with:

blink/xlat.c:762:48: error: use of undeclared identifier 'CLOCK_PROCESS_CPUTIME_ID'
    CASE(CLOCK_PROCESS_CPUTIME_ID_LINUX, res = CLOCK_PROCESS_CPUTIME_ID);
                                               ^
blink/xlat.c:763:47: error: use of undeclared identifier 'CLOCK_THREAD_CPUTIME_ID'
    CASE(CLOCK_THREAD_CPUTIME_ID_LINUX, res = CLOCK_THREAD_CPUTIME_ID);
                                              ^
2 errors generated.

See https://github.com/macports/macports-legacy-support/pull/58 which attempted to add support for those.

comment:3 Changed 16 months ago by ryandesign (Ryan Carsten Schmidt)

In 710f33b8bb1e985b8b658a7b3819a09bd7fbea88/macports-ports (master):

blink: Requires darwin >= 16

See: #67888

Note: See TracTickets for help on using tickets.