]> granicus.if.org Git - llvm/commit
[DynamicLibrary] Fix build on musl libc
authorKeno Fischer <keno@alumni.harvard.edu>
Thu, 26 Oct 2017 16:44:13 +0000 (16:44 +0000)
committerKeno Fischer <keno@alumni.harvard.edu>
Thu, 26 Oct 2017 16:44:13 +0000 (16:44 +0000)
commitae8900a8833835309aecb0a3d947c2ae46fd86c3
treec6c9ac9b971e57f2e1639af4631040365f73c578
parent228f43d82feef56c1b9bb759683a583adc0a1b0d
[DynamicLibrary] Fix build on musl libc

Summary:
On musl libc, stdin/out/err are defined as `FILE* const` globals,
and their address is not implicitly convertible to void *,
or at least gcc 6 doesn't allow it, giving errors like:

```
error: cannot initialize return object of type 'void *' with an rvalue of type 'FILE *const *' (aka '_IO_FILE *const *')
    EXPLICIT_SYMBOL(stderr);
    ^~~~~~~~~~~~~~~~~~~~~~~
```

Add an explicit cast to fix that problem.

Reviewers: marsupial, krytarowski, dim
Reviewed By: dim
Differential Revision: https://reviews.llvm.org/D39297

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316672 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Unix/DynamicLibrary.inc