> On 25 Oct 2016, at 14:40, Paolo Bonzini <pbonz...@redhat.com> wrote:
> 
> 
> ... I think you need to use -mmacosx-version-min=10.10 or something like
> that, ...

I tried this, and I also tried "export MACOSX_DEPLOYMENT_TARGET=10.11", but 
they did not help.

in this case, the decision to refer to `clock_gettime()` is made by `#ifdef 
CLOCK_MONOTONIC`, which seems to be always defined in <time.h> on 10.12.

if you want to test this, you can use:

cat <<EOF >/tmp/cg.c
#include <time.h>

#if defined(CLOCK_MONOTONIC)
#error CLOCK_MONOTONIC is defined
#endif
EOF

gcc /tmp/cg.c

gcc -mmacosx-version-min=10.11 /tmp/cg.c

MACOSX_DEPLOYMENT_TARGET=10.11; gcc /tmp/cg.c

...


if you find a combination of compiler options to prevent the error, then adding 
it to --extra-cflags might help.


regards,

Liviu


Reply via email to