diff options
author | 2021-09-14 14:35:15 -0700 | |
---|---|---|
committer | 2021-09-17 22:54:50 +0000 | |
commit | 073885cca8f9c52cc11629f9933ef97b6686bcfa (patch) | |
tree | 33a4a90eb66e0536fb037f3492cb6255d3c845a4 /sigchainlib/sigchain_test.cc | |
parent | 96d8f4f3cf969ba8ab61abfb813b47969fe73bcc (diff) |
Fix art compiling against musl
Fix various issues when compling art against musl:
Check for ANDROID_HOST_MUSL when defining strlcpy and sig*64.
Remove error.h, its not used and doesn't exist in musl.
Include time.h that was being included transitively in glibc but
not in musl.
Add the musl libc library name to the list.
pthread_sigqueue takes a sigval, not a sigval_t.
Bug: 190084016
Test: m USE_HOST_MUSL=true
Change-Id: I2548ef0013234c42efded411c733450c19434855
Diffstat (limited to 'sigchainlib/sigchain_test.cc')
-rw-r--r-- | sigchainlib/sigchain_test.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sigchainlib/sigchain_test.cc b/sigchainlib/sigchain_test.cc index 249fff1a5e..d879f5ac85 100644 --- a/sigchainlib/sigchain_test.cc +++ b/sigchainlib/sigchain_test.cc @@ -73,13 +73,13 @@ class SigchainTest : public ::testing::Test { protected: void RaiseHandled() { - sigval_t value; + sigval value; value.sival_ptr = &value; pthread_sigqueue(pthread_self(), SIGSEGV, value); } void RaiseUnhandled() { - sigval_t value; + sigval value; value.sival_ptr = nullptr; pthread_sigqueue(pthread_self(), SIGSEGV, value); } @@ -208,6 +208,8 @@ TEST_F(SigchainTest, EnsureFrontOfChain) { constexpr char kLibcSoName[] = "libc.so"; #elif defined(__GNU_LIBRARY__) && __GNU_LIBRARY__ == 6 constexpr char kLibcSoName[] = "libc.so.6"; +#elif defined(ANDROID_HOST_MUSL) + constexpr char kLibcSoName[] = "libc_musl.so"; #else #error Unknown libc #endif |