Include pthread.h when using pthread_sigmask

Tom Birch via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 19:33:05 PST 2016


Was failing to build for for android NDK:

[87/211] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Process.cpp.o
FAILED: /Users/tbirch/src/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/bin/clang++  --target=armv7-none-linux-androideabi --sysroot=/Users/tbirch/src/android-ndk-r10e/platforms/android-21/arch-arm  -DGTEST_HAS_RTTI=0 -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Support -I/Users/tbirch/src/swift-android/llvm/lib/Support -isystem /Users/tbirch/src/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include -isystem /Users/tbirch/src/android-ndk-r10e/sources/android/support/include -Iinclude -I/Users/tbirch/src/swift-android/llvm/include -B /Users/tbirch/src/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/bin/ -fno-stack-protector -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -O3    -UNDEBUG  -fno-exceptions -fno-rtti -MMD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Process.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/Process.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/Process.cpp.o -c /Users/tbirch/src/swift-android/llvm/lib/Support/Process.cpp
In file included from /Users/tbirch/src/swift-android/llvm/lib/Support/Process.cpp:78:
/Users/tbirch/src/swift-android/llvm/lib/Support/Unix/Process.inc:255:16: error: use of undeclared identifier 'pthread_sigmask'
  if (int EC = pthread_sigmask(SIG_SETMASK, &FullSet, &SavedSet))
               ^
/Users/tbirch/src/swift-android/llvm/lib/Support/Unix/Process.inc:270:8: error: use of undeclared identifier 'pthread_sigmask'
  EC = pthread_sigmask(SIG_SETMASK, &SavedSet, nullptr);
       ^

-------------- next part --------------
A non-text attachment was scrubbed...
Name: process.diff
Type: application/octet-stream
Size: 514 bytes
Desc: process.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160122/f93dcc53/attachment.obj>


More information about the llvm-commits mailing list