xiangzhai created this revision. Hi LLVM developers,
Resurrect pselect MainLoop implementation https://reviews.llvm.org/D32600 commited by Pavel, then it failed to build for Linux: /data/project/LLVM/llvm/tools/lldb/source/Host/common/MainLoop.cpp:158:10: error: no viable conversion from returned value of type 'int' to function return type 'sigset_t' (aka '__sigset_t') return 0; ^ /usr/include/bits/sigset.h:27:9: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const __sigset_t &' for 1st argument typedef struct ^ /usr/include/bits/sigset.h:27:9: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to '__sigset_t &&' for 1st argument 1 error generated. So I simply changed the return value, please review my patch and point out my fault, thanks a lot! Regards, Leslie Zhai Repository: rL LLVM https://reviews.llvm.org/D32787 Files: source/Host/common/MainLoop.cpp Index: source/Host/common/MainLoop.cpp =================================================================== --- source/Host/common/MainLoop.cpp +++ source/Host/common/MainLoop.cpp @@ -155,7 +155,9 @@ sigset_t MainLoop::RunImpl::get_sigmask() { #if SIGNAL_POLLING_UNSUPPORTED - return 0; + sigset_t sigmask; + memset(sigmask.__val, 0, _SIGSET_NWORDS); + return sigmask; #else sigset_t sigmask; int ret = pthread_sigmask(SIG_SETMASK, nullptr, &sigmask);
Index: source/Host/common/MainLoop.cpp =================================================================== --- source/Host/common/MainLoop.cpp +++ source/Host/common/MainLoop.cpp @@ -155,7 +155,9 @@ sigset_t MainLoop::RunImpl::get_sigmask() { #if SIGNAL_POLLING_UNSUPPORTED - return 0; + sigset_t sigmask; + memset(sigmask.__val, 0, _SIGSET_NWORDS); + return sigmask; #else sigset_t sigmask; int ret = pthread_sigmask(SIG_SETMASK, nullptr, &sigmask);
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits