jlpeyton added a comment. `_GNU_SOURCE` has to be defined for the `char*` version to be used (which we do by sending in -D_GNU_SOURCE during compilation). So have the `#if` be #if defined(__GLIBC__) && defined(_GNU_SOURCE) https://reviews.llvm.org/D25071