[compiler-rt] r183523 - [sanitizer] Fix Android build.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Fri Jun 7 07:56:54 PDT 2013
Author: eugenis
Date: Fri Jun 7 09:56:54 2013
New Revision: 183523
URL: http://llvm.org/viewvc/llvm-project?rev=183523&view=rev
Log:
[sanitizer] Fix Android build.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc?rev=183523&r1=183522&r2=183523&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc Fri Jun 7 09:56:54 2013
@@ -432,9 +432,6 @@ SCANF_INTERCEPTOR_IMPL(__isoc99_sscanf,
#if SANITIZER_INTERCEPT_IOCTL
#include "sanitizer_common_interceptors_ioctl.inc"
-#define INIT_IOCTL \
- ioctl_init(); \
- INTERCEPT_FUNCTION(ioctl);
INTERCEPTOR(int, ioctl, int d, unsigned request, void *arg) {
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, ioctl, d, request, arg);
@@ -458,6 +455,9 @@ INTERCEPTOR(int, ioctl, int d, unsigned
ioctl_common_post(ctx, desc, res, d, request, arg);
return res;
}
+#define INIT_IOCTL \
+ ioctl_init(); \
+ INTERCEPT_FUNCTION(ioctl);
#else
#define INIT_IOCTL
#endif
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc?rev=183523&r1=183522&r2=183523&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc Fri Jun 7 09:56:54 2013
@@ -85,8 +85,11 @@ static void ioctl_table_fill() {
_(0x00008932, READ, struct_ifreq_sz); // SIOCDELMULTI
_(0x00008940, NONE, 0); // SIOCADDRTOLD
_(0x00008941, NONE, 0); // SIOCDELRTOLD
+
+#if (SANITIZER_LINUX && !SANITIZER_ANDROID) || SANITIZER_MAC
_(0x000089E0, WRITE, struct_sioc_vif_req_sz); // SIOCGETVIFCNT
_(0x000089E1, WRITE, struct_sioc_sg_req_sz); // SIOCGETSGCNT
+#endif
#if SANITIZER_LINUX
_(0x00000000, NONE, 0); // FDCLRPRM
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=183523&r1=183522&r2=183523&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 Fri Jun 7 09:56:54 2013
@@ -69,6 +69,7 @@
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID
#if SANITIZER_ANDROID
+#include <linux/kd.h>
#include <linux/mtio.h>
#endif
More information about the llvm-commits
mailing list