81 lines
2.4 KiB
Diff
81 lines
2.4 KiB
Diff
From 13b33959b864e3697e8dad002577321de13f4cc9 Mon Sep 17 00:00:00 2001
|
|
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
|
Date: Tue, 8 Sep 2015 23:00:56 +0200
|
|
Subject: [PATCH] fix musl
|
|
|
|
---
|
|
source/Core/ConnectionSharedMemory.cpp | 1 +
|
|
source/Host/common/FileSpec.cpp | 1 +
|
|
source/Host/linux/Host.cpp | 2 +-
|
|
source/Host/linux/HostThreadLinux.cpp | 2 ++
|
|
source/Plugins/Process/Linux/Procfs.h | 2 +-
|
|
5 files changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/source/Core/ConnectionSharedMemory.cpp b/source/Core/ConnectionSharedMemory.cpp
|
|
index 77daeb1..36e9bc7 100644
|
|
--- a/source/Core/ConnectionSharedMemory.cpp
|
|
+++ b/source/Core/ConnectionSharedMemory.cpp
|
|
@@ -16,6 +16,7 @@
|
|
#ifdef _WIN32
|
|
#include "lldb/Host/windows/windows.h"
|
|
#else
|
|
+#include <fcntl.h> /* O_RDRW */
|
|
#include <sys/file.h>
|
|
#include <sys/mman.h>
|
|
#include <sys/stat.h>
|
|
diff --git a/source/Host/common/FileSpec.cpp b/source/Host/common/FileSpec.cpp
|
|
index ceb094b..a48620d 100644
|
|
--- a/source/Host/common/FileSpec.cpp
|
|
+++ b/source/Host/common/FileSpec.cpp
|
|
@@ -14,6 +14,7 @@
|
|
#include "lldb/Host/windows/windows.h"
|
|
#endif
|
|
#include <fcntl.h>
|
|
+#include <limits.h> /* PATH_MAX */
|
|
#ifndef _MSC_VER
|
|
#include <libgen.h>
|
|
#endif
|
|
diff --git a/source/Host/linux/Host.cpp b/source/Host/linux/Host.cpp
|
|
index 6217b1d..edcfa4a 100644
|
|
--- a/source/Host/linux/Host.cpp
|
|
+++ b/source/Host/linux/Host.cpp
|
|
@@ -14,7 +14,7 @@
|
|
#include <sys/stat.h>
|
|
#include <dirent.h>
|
|
#include <fcntl.h>
|
|
-#ifndef __ANDROID__
|
|
+#ifdef __GLIBC__
|
|
#include <execinfo.h>
|
|
#endif
|
|
|
|
diff --git a/source/Host/linux/HostThreadLinux.cpp b/source/Host/linux/HostThreadLinux.cpp
|
|
index 8151215..a849e51 100644
|
|
--- a/source/Host/linux/HostThreadLinux.cpp
|
|
+++ b/source/Host/linux/HostThreadLinux.cpp
|
|
@@ -30,7 +30,9 @@ HostThreadLinux::HostThreadLinux(lldb::thread_t thread)
|
|
void
|
|
HostThreadLinux::SetName(lldb::thread_t thread, llvm::StringRef name)
|
|
{
|
|
+#if defined(__ANDROID__) || defined(__GLIBC__)
|
|
::pthread_setname_np(thread, name.data());
|
|
+#endif
|
|
}
|
|
|
|
void
|
|
diff --git a/source/Plugins/Process/Linux/Procfs.h b/source/Plugins/Process/Linux/Procfs.h
|
|
index 1b383fb..4ebe390 100644
|
|
--- a/source/Plugins/Process/Linux/Procfs.h
|
|
+++ b/source/Plugins/Process/Linux/Procfs.h
|
|
@@ -12,7 +12,7 @@
|
|
|
|
#include <sys/ptrace.h>
|
|
|
|
-#ifdef __ANDROID__
|
|
+#ifndef __GLIBC__
|
|
#if defined (__arm64__) || defined (__aarch64__)
|
|
typedef unsigned long elf_greg_t;
|
|
typedef elf_greg_t elf_gregset_t[(sizeof (struct user_pt_regs) / sizeof(elf_greg_t))];
|
|
--
|
|
2.5.1
|
|
|