[issue29057] Compiler failure on Mac OS X - sys/random.h

Pam McA'Nulty report at bugs.python.org
Sun Jan 1 14:18:19 EST 2017


Pam McA'Nulty added the comment:

I've dug into things some more.

In my mac environment, sys/random.h is pretty empty and doesn't actually seem to provide anything that Python/random.c uses.  The compile error is a type error is because 'u_int' never gets typedef'd in the rest of the compile includes.

I think the bottom line is that sys/random.h on mac os is neither useful, nor required.

Below is the error again and I've attached my sys/random.h
```
In file included from Python/random.c:16:
/usr/include/sys/random.h:37:32: error: unknown type name 'u_int'
void read_random(void* buffer, u_int numBytes);
                               ^
/usr/include/sys/random.h:38:33: error: unknown type name 'u_int'
void read_frandom(void* buffer, u_int numBytes);
                                ^
/usr/include/sys/random.h:39:33: error: unknown type name 'u_int'
int  write_random(void* buffer, u_int numBytes);
```

----------
Added file: http://bugs.python.org/file46108/random.h

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29057>
_______________________________________


More information about the Python-bugs-list mailing list