[PATCH] D39297: [DynamicLibrary] Fix build on musl libc

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 09:44:47 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL316672: [DynamicLibrary] Fix build on musl libc (authored by kfischer).

Changed prior to commit:
  https://reviews.llvm.org/D39297?vs=120274&id=120439#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D39297

Files:
  llvm/trunk/lib/Support/Unix/DynamicLibrary.inc


Index: llvm/trunk/lib/Support/Unix/DynamicLibrary.inc
===================================================================
--- llvm/trunk/lib/Support/Unix/DynamicLibrary.inc
+++ llvm/trunk/lib/Support/Unix/DynamicLibrary.inc
@@ -71,7 +71,7 @@
 // Must declare the symbols in the global namespace.
 static void *DoSearch(const char* SymbolName) {
 #define EXPLICIT_SYMBOL(SYM) \
-   extern void *SYM; if (!strcmp(SymbolName, #SYM)) return &SYM
+   extern void *SYM; if (!strcmp(SymbolName, #SYM)) return (void*)&SYM
 
   // If this is darwin, it has some funky issues, try to solve them here.  Some
   // important symbols are marked 'private external' which doesn't allow


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39297.120439.patch
Type: text/x-patch
Size: 671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171026/46395284/attachment.bin>


More information about the llvm-commits mailing list