[Openmp-commits] [openmp] r284492 - Fix a compile error on musl-libc due to strerror_r() prototype

Hahnfeld, Jonas via Openmp-commits openmp-commits at lists.llvm.org
Tue Oct 18 23:07:06 PDT 2016


Hi Michal,

please include a "Patch by <...>!" in the future as described in the developer 
policy:
http://llvm.org/docs/DeveloperPolicy.html#commit-messages

Thanks,
Jonas

> -----Original Message-----
> From: Openmp-commits [mailto:openmp-commits-bounces at lists.llvm.org]
> On Behalf Of Michal Gorny via Openmp-commits
> Sent: Tuesday, October 18, 2016 6:39 PM
> To: openmp-commits at lists.llvm.org
> Subject: [Openmp-commits] [openmp] r284492 - Fix a compile error on musl-
> libc due to strerror_r() prototype
>
> Author: mgorny
> Date: Tue Oct 18 11:38:44 2016
> New Revision: 284492
>
> URL: http://llvm.org/viewvc/llvm-project?rev=284492&view=rev
> Log:
> 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
>
> Modified:
>     openmp/trunk/runtime/src/kmp_i18n.c
>
> Modified: openmp/trunk/runtime/src/kmp_i18n.c
> URL: http://llvm.org/viewvc/llvm-
> project/openmp/trunk/runtime/src/kmp_i18n.c?rev=284492&r1=284491&r2
> =284492&view=diff
> ==========================================================
> ====================
> --- openmp/trunk/runtime/src/kmp_i18n.c (original)
> +++ openmp/trunk/runtime/src/kmp_i18n.c Tue Oct 18 11:38:44 2016
> @@ -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.
>
>
>
> _______________________________________________
> Openmp-commits mailing list
> Openmp-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20161019/d01af2c2/attachment.bin>


More information about the Openmp-commits mailing list