Prophidys / RTG2

Realtime Traffic Grapher 2
GNU General Public License v2.0
11 stars 9 forks source link

Can't compile on Mac OS X #28

Open Prophidys opened 9 years ago

Prophidys commented 9 years ago

From ced.leco...@gmail.com on February 17, 2012 10:26:39

What steps will reproduce the problem? 1. ./bootstrap.sh

  1. ./configure
  2. make What is the expected output? What do you see instead? librtgmysql.c:192: error: 'CLOCK_REALTIME' undeclared Please use labels and text to provide additional information. This can be correct by changing this :

clock_gettime(CLOCK_REALTIME,&ts1); com_ret = mysql_commit(mysql); clock_gettime(CLOCK_REALTIME,&ts2);

by this :

if _POSIX_TIMERS > 0

clock_gettime(CLOCK_REALTIME, &ts1);

else

struct timeval tv; gettimeofday(&tv, NULL); ts1.tv_sec = tv.tv_sec; ts1.tv_nsec = tv.tv_usec*1000;

endif

com_ret = mysql_commit(&mysql);

if _POSIX_TIMERS > 0

clock_gettime(CLOCK_REALTIME, &ts2);

else

gettimeofday(&tv, NULL); ts2.tv_sec = tv.tv_sec; ts2.tv_nsec = tv.tv_usec*1000;

endif

Original issue: http://code.google.com/p/rtg2/issues/detail?id=28