Use o/s provided sys/types.h to bring in Profiling types.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Re-examine the patch a little bit. Have you checked older FreeBSD system works with the patch? See the old comment in the code:
System headers define 'size_t' incorrectly on x64 FreeBSD (prior to
- FreeBSD 10, r232261) when compiled in 32-bit mode
PRIu64 macro also does not seem to be defined in sys/types.h but in inttypes.h
If I recall correctly, FreeBSD didn't properly support compiling in 32-bit mode on a 64-bit x86 platform anyway, before this commit. So maybe the issue is a little moot now. Also, no supported releases of FreeBSD have the old-style headers anymore.
On the other hand, we could also test __FreeBSD_version here. @emaste, what do you think about it? I believe >= 1000010 and and >= 902509 are the versions where the header is guaranteed to be correct.
PRIu64 macro also does not seem to be defined in sys/types.h but in inttypes.h
Yes, it is indeed defined there. Let's just include inttypes.h, then.
Ok thanks. I will first commit a patch that includes inttypes.h and
sys/types.h for FreeBSD. If there is a need to support older
versionsof FreeBSD, we can add checks for FreeBSE version.
David