[GHC] #12195: RTS GetTime.c is broken on Darwins that include clock_gettime

GHC ghc-devs at haskell.org
Thu Jun 16 03:38:46 UTC 2016


#12195: RTS GetTime.c is broken on Darwins that include clock_gettime
-------------------------------------+-------------------------------------
           Reporter:  mistydemeo     |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 GHC fails to build on versions of Darwin which include `clock_gettime`.

 On Darwin versions which include `clock_gettime`, the `#ifdef`s are
 structured to prefer using `clock_gettime` over the mach-specific time
 functions and structs; however, a couple of places in GetTime.c use the
 mach functions unconditionally even though the `mach/mach_time.h` header
 won't be included if `clock_gettime` is available.

 The attached patch fixes this by checking `HAVE_CLOCK_GETTIME` first
 before checking if the OS is Darwin.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12195>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list