Opened 3 years ago

Closed 3 years ago

#65124 closed defect (fixed)

got: error: use of undeclared identifier 'CLOCK_MONOTONIC'

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: artkiver (グレェ)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: elcapitan Cc: artkiver (グレェ)
Port: got

Description

got fails to build on OS X 10.11 and earlier:

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

../../lib/ratelimit.c:43:6: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
        if (clock_gettime(CLOCK_MONOTONIC, &now) == -1)
            ^
../../lib/ratelimit.c:43:20: error: use of undeclared identifier 'CLOCK_MONOTONIC'
        if (clock_gettime(CLOCK_MONOTONIC, &now) == -1)
                          ^
1 warning and 1 error generated.

clock_gettime and related identifiers were added in macOS 10.12. Consider including the legacy support portgroup which provides an implementation of clock_gettime for older systems.

Change History (1)

comment:1 Changed 3 years ago by artkiver (グレェ)

Owner: set to artkiver
Resolution: fixed
Status: newclosed

In 5cbc02c91e63172cf2a20c8bbc908c03f5d53a5a/macports-ports (master):

got: update to version 0.70

  • update to version 0.70
  • add legacysupport 1.1 PortGroup per ryandesign's recommendation

Closes: #65124

Note: See TracTickets for help on using tickets.