ssanthosh243 / semicomplete

Automatically exported from code.google.com/p/semicomplete
0 stars 0 forks source link

implicit declaration of function 'clock_gettime'; 'CLOCK_MONOTONIC' undeclared #37

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. make

What is the expected output? What do you see instead?
Expected successful compile but got:

cmd_getwindowname.c: In function 'cmd_getwindowname':
cmd_getwindowname.c:42: warning: passing argument 3 of 'xdo_get_window_name' 
from incompatible pointer type
/usr/bin/gcc-4.2 -O2 -std=c99 -I/opt/local/include     -c -o 
cmd_behave_screen_edge.o cmd_behave_screen_edge.c
cmd_behave_screen_edge.c: In function 'cmd_behave_screen_edge':
cmd_behave_screen_edge.c:221: warning: implicit declaration of function 
'clock_gettime'
cmd_behave_screen_edge.c:221: error: 'CLOCK_MONOTONIC' undeclared (first use in 
this function)
cmd_behave_screen_edge.c:221: error: (Each undeclared identifier is reported 
only once
cmd_behave_screen_edge.c:221: error: for each function it appears in.)
make: *** [cmd_behave_screen_edge.o] Error 1

What version of the product are you using? On what operating system?
xdotool 2.20101012.3049; Mac OS X 10.6.4 x86_64

Please provide any additional information below.
xdotool 2.20100818.3004 did not have this problem.

Original issue reported on code.google.com by ryandesi...@gmail.com on 13 Oct 2010 at 8:47

GoogleCodeExporter commented 9 years ago
Sigh. Looks like OS X doesn't implement clock_gettime at all in some cases, or 
if it does, it definitely doesn't implement CLOCK_MONOTONIC.

http://www.wand.net.nz/~smr26/wordpress/2009/01/19/monotonic-time-in-mac-os-x/

Several other sources from google seem to agree. I'll try to work around it.

Original comment by jls.semi...@gmail.com on 13 Oct 2010 at 6:35

GoogleCodeExporter commented 9 years ago
I've tried to work around it by implementing clock_gettime myself when we are 
building on OS X.

Can you confirm?

Release candidate: 
http://semicomplete.com/files/xdotool/xdotool-2.20101014.3063.tar.gz

Original comment by jls.semi...@gmail.com on 15 Oct 2010 at 12:40

GoogleCodeExporter commented 9 years ago
Sorry I forgot to test this before, but 2.20110530.1 does build. Thanks.

Original comment by ryandesi...@gmail.com on 30 May 2011 at 12:03