|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
From d12ecb83d01dcb580dd94f4d57828f33d3eb4c35 Mon Sep 17 00:00:00 2001
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
From: Natanael Copa <ncopa@alpinelinux.org>
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
Date: Thu, 18 Feb 2016 15:33:21 +0100
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
Subject: [PATCH 3/3] Fix DynamicLibrary to build with musl libc
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
stdin/out/err is part of the libc and not the kernel so we check for the
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
specific libc that does the unexpected instead of linux.
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
This is needed for making it build with musl libc.
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
---
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
lib/Support/DynamicLibrary.cpp | 4 ++--
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
diff --git a/lib/Support/DynamicLibrary.cpp b/lib/Support/DynamicLibrary.cpp
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
index 9a7aeb5..0c1c8f8 100644
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
--- a/lib/Support/DynamicLibrary.cpp
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
+++ b/lib/Support/DynamicLibrary.cpp
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
@@ -140,10 +140,10 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) {
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
#define EXPLICIT_SYMBOL(SYM) \
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
if (!strcmp(symbolName, #SYM)) return &SYM
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
-// On linux we have a weird situation. The stderr/out/in symbols are both
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
+// On GNU libc we have a weird situation. The stderr/out/in symbols are both
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
// macros and global variables because of standards requirements. So, we
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
// boldly use the EXPLICIT_SYMBOL macro without checking for a #define first.
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
-#if defined(__linux__) and !defined(__ANDROID__)
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
+#if defined(__GLIBC__)
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
{
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
EXPLICIT_SYMBOL(stderr);
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
EXPLICIT_SYMBOL(stdout);
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
--
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
2.7.3
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
585426 |
|