On 07/03/2011 11:40 PM, [email protected] wrote: > This file doesn't compile for two reasons. First, in line 6, the pointer tv > does not exist. More interestingly, the ./configure clockid_t check fails. > This is taken care of by src/cf.defs.h where clockid_t is typedef'ed to an > int. But this file is not included by pub/clock_gettime, and root Makefile.am > wants to build pub before src, so it doesn't even work by accident. > > Simply including "../src/cf.defs.h" works, but seems like a bad hack, running > the risk of circular dependencies in the future. Inlining > > #ifndef HAVE_CLOCKID_T > typedef int clockid_t; > #endif > > #if !HAVE_DECL_CLOCK_GETTIME > int clock_gettime(clockid_t clock_id,struct timespec *tp); > #endif > > in pub/clock_gettime.c from src/cf.defs.h works without generating any > warnings in gcc or clang, which i take to mean that re-typedefing doesn't > generate warnings.
Thanks for diagnostics, I have commited similar change (r2636). -- Mikhail Gusarov Systems Engineer CFEngine AS Nydalsveien 33 0484 Oslo _______________________________________________ Help-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/help-cfengine
