From fc2f62a10d7216352d8c671006e8239fd487b421 Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Fri, 28 Jul 2017 00:18:31 +0200 Subject: [PATCH] Fix Alpine build (#13052) This change fixes CoreCLR build on Alpine Linux --- build.sh | 5 +++-- src/debug/createdump/threadinfo.cpp | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 52ad1ae..91a97e4 100755 --- a/build.sh +++ b/build.sh @@ -390,10 +390,11 @@ isMSBuildOnNETCoreSupported() if [ "$__HostArch" == "x64" ]; then if [ "$__HostOS" == "Linux" ]; then __isMSBuildOnNETCoreSupported=1 - UNSUPPORTED_RIDS=("debian.9-x64" "ubuntu.17.04-x64") + # note: the RIDs below can use globbing patterns + UNSUPPORTED_RIDS=("debian.9-x64" "ubuntu.17.04-x64" "alpine.3.6.*-x64") for UNSUPPORTED_RID in "${UNSUPPORTED_RIDS[@]}" do - if [ "$__HostDistroRid" == "$UNSUPPORTED_RID" ]; then + if [[ $__HostDistroRid == $UNSUPPORTED_RID ]]; then __isMSBuildOnNETCoreSupported=0 break fi diff --git a/src/debug/createdump/threadinfo.cpp b/src/debug/createdump/threadinfo.cpp index 0bb439e..6a91ed7 100644 --- a/src/debug/createdump/threadinfo.cpp +++ b/src/debug/createdump/threadinfo.cpp @@ -5,6 +5,10 @@ #include "createdump.h" #include +#ifndef __GLIBC__ +typedef int __ptrace_request; +#endif + #define FPREG_ErrorOffset(fpregs) *(DWORD*)&((fpregs).rip) #define FPREG_ErrorSelector(fpregs) *(((WORD*)&((fpregs).rip)) + 2) #define FPREG_DataOffset(fpregs) *(DWORD*)&((fpregs).rdp) -- 2.7.4