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

Keno Fischer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 05:20:16 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1c43ad09650a: [DynamicLibrary] Fix build on musl libc (authored by loladiro).
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

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

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D39297/new/

https://reviews.llvm.org/D39297

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


Index: llvm/lib/Support/Unix/DynamicLibrary.inc
===================================================================
--- llvm/lib/Support/Unix/DynamicLibrary.inc
+++ llvm/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.223520.patch
Type: text/x-patch
Size: 653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191007/5a38ffc7/attachment.bin>


More information about the llvm-commits mailing list