[Simh] BUGREPORT: clock_getres()

Alexander Voropay alec at sensi.org
Sat Apr 26 16:52:05 EDT 2008


Hi!

 On some systems (i.e. RedHat AS 4.4) clock_getres() function resides
in the librt library.

 The man clock_getres states:

=========
NOTE
      Most systems require the program be linked with the librt  library  to
      use these functions.

AVAILABILITY
      On  POSIX  systems  on which these functions are available, the symbol
      _POSIX_TIMERS is defined in <unistd.h> to a value greater than 0.  The
      symbols  _POSIX_MONOTONIC_CLOCK, _POSIX_CPUTIME, _POSIX_THREAD_CPUTIME
      indicate     that      CLOCK_MONOTONIC,      CLOCK_PROCESS_CPUTIME_ID,
      CLOCK_THREAD_CPUTIME_ID are available.  (See also .BR sysconf (3).)
============

Could you please add "-l rt" in the makefile if _POSIX_TIMERS is defined ?

 I personally did q'n'dirty patch to compile SIMH on the RHAS 4.4
-D_GNU_SOURCE -lrt


Also, BIN directory does not exist and make does not creares it automatically.

--
-=AV=-



More information about the Simh mailing list