[compiler-rt] r178756 - [sanitizer] Android lacks ucontext_t definition.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Thu Apr 4 02:21:48 PDT 2013


Author: eugenis
Date: Thu Apr  4 04:21:48 2013
New Revision: 178756

URL: http://llvm.org/viewvc/llvm-project?rev=178756&view=rev
Log:
[sanitizer] Android lacks ucontext_t definition.

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc?rev=178756&r1=178755&r2=178756&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Thu Apr  4 04:21:48 2013
@@ -29,9 +29,12 @@
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <sys/socket.h>
-#include <sys/ucontext.h>
 #include <time.h>
 
+#if !SANITIZER_ANDROID
+#include <sys/ucontext.h>
+#endif // !SANITIZER_ANDROID
+
 #if SANITIZER_LINUX
 #include <sys/vfs.h>
 #include <sys/epoll.h>
@@ -47,7 +50,10 @@ namespace __sanitizer {
   unsigned struct_sigaction_sz = sizeof(struct sigaction);
   unsigned struct_itimerval_sz = sizeof(struct itimerval);
   unsigned pthread_t_sz = sizeof(pthread_t);
+
+#if !SANITIZER_ANDROID
   unsigned ucontext_t_sz = sizeof(ucontext_t);
+#endif // !SANITIZER_ANDROID
 
 #if SANITIZER_LINUX
   unsigned struct_rlimit_sz = sizeof(struct rlimit);

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h?rev=178756&r1=178755&r2=178756&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h Thu Apr  4 04:21:48 2013
@@ -27,7 +27,10 @@ namespace __sanitizer {
   extern unsigned struct_sigaction_sz;
   extern unsigned struct_itimerval_sz;
   extern unsigned pthread_t_sz;
+
+#if !SANITIZER_ANDROID
   extern unsigned ucontext_t_sz;
+#endif // !SANITIZER_ANDROID
 
 #if SANITIZER_LINUX
   extern unsigned struct_rlimit_sz;





More information about the llvm-commits mailing list