◐ Shell
clean mode source ↗

Message 285071 - Python tracker

I am encountering this problem on macOS 10.12.2, with Xcode 8.2.1 (latest).

I have tried building from the following cpython branches today (using the github fork):

2.7: 13a39142c047
In file included from ../../Python/random.c:7:
/usr/include/sys/random.h:37:32: error: unknown type name 'u_int'
void read_random(void* buffer, u_int numBytes);


3.5: 35334a4d41aa
3.6: 6bf563472ccd
Both 3.x branches report a different error:

../../Python/pytime.c:567:11: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
    err = clock_gettime(CLOCK_REALTIME, &ts);
          ^
../../Python/pytime.c:567:25: error: use of undeclared identifier 'CLOCK_REALTIME'
    err = clock_gettime(CLOCK_REALTIME, &ts);
                        ^
../../Python/pytime.c:581:13: warning: implicit declaration of function 'clock_getres' is invalid in C99 [-Wimplicit-function-declaration]
        if (clock_getres(CLOCK_REALTIME, &res) == 0)
            ^
../../Python/pytime.c:581:26: error: use of undeclared identifier 'CLOCK_REALTIME'
        if (clock_getres(CLOCK_REALTIME, &res) == 0)
                         ^