diff options
| author | Michal Gorny <mgorny@gentoo.org> | 2016-10-18 16:38:44 +0000 |
|---|---|---|
| committer | Michal Gorny <mgorny@gentoo.org> | 2016-10-18 16:38:44 +0000 |
| commit | efc536ee9d2347700cb0ff76f2c16d121a7adbb4 (patch) | |
| tree | 9b2302af1e19a3d6d741a085cf5ce8ac38b0cfd2 | |
| parent | 25e9628978fcfed189f9de2e559d0845155b21ae (diff) | |
| download | bcm5719-llvm-efc536ee9d2347700cb0ff76f2c16d121a7adbb4.tar.gz bcm5719-llvm-efc536ee9d2347700cb0ff76f2c16d121a7adbb4.zip | |
Fix a compile error on musl-libc due to strerror_r() prototype
Function strerror_r() has different signatures in different
implementations of libc: glibc's version returns a char*, while BSDs
and musl return a int. libomp unconditionally assumes glibc on Linux
and thus fails to compile against musl-libc. This patch addresses this
issue.
Differential Revision: https://reviews.llvm.org/D25071
llvm-svn: 284492
| -rw-r--r-- | openmp/runtime/src/kmp_i18n.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openmp/runtime/src/kmp_i18n.c b/openmp/runtime/src/kmp_i18n.c index 546e69349d1..e008d1f1446 100644 --- a/openmp/runtime/src/kmp_i18n.c +++ b/openmp/runtime/src/kmp_i18n.c @@ -809,7 +809,7 @@ sys_error( int strerror_r( int, char *, size_t ); // XSI version */ - #if KMP_OS_LINUX + #if defined(__GLIBC__) && defined(_GNU_SOURCE) // GNU version of strerror_r. |

