qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] macOS 10.12 Sierra, Xcode 8 & clock_gettime()


From: Liviu Ionescu
Subject: Re: [Qemu-devel] macOS 10.12 Sierra, Xcode 8 & clock_gettime()
Date: Tue, 25 Oct 2016 16:36:06 +0300

> On 25 Oct 2016, at 14:40, Paolo Bonzini <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]