[sanitizer] Fix Android build.

llvm-svn: 183523
This commit is contained in:
Evgeniy Stepanov 2013-06-07 14:56:54 +00:00
parent e7b6d544f0
commit c24e13e7bb
3 changed files with 7 additions and 3 deletions

View File

@ -432,9 +432,6 @@ SCANF_INTERCEPTOR_IMPL(__isoc99_sscanf, __isoc99_vsscanf, str, format)
#if SANITIZER_INTERCEPT_IOCTL #if SANITIZER_INTERCEPT_IOCTL
#include "sanitizer_common_interceptors_ioctl.inc" #include "sanitizer_common_interceptors_ioctl.inc"
#define INIT_IOCTL \
ioctl_init(); \
INTERCEPT_FUNCTION(ioctl);
INTERCEPTOR(int, ioctl, int d, unsigned request, void *arg) { INTERCEPTOR(int, ioctl, int d, unsigned request, void *arg) {
void *ctx; void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, ioctl, d, request, arg); COMMON_INTERCEPTOR_ENTER(ctx, ioctl, d, request, arg);
@ -458,6 +455,9 @@ INTERCEPTOR(int, ioctl, int d, unsigned request, void *arg) {
ioctl_common_post(ctx, desc, res, d, request, arg); ioctl_common_post(ctx, desc, res, d, request, arg);
return res; return res;
} }
#define INIT_IOCTL \
ioctl_init(); \
INTERCEPT_FUNCTION(ioctl);
#else #else
#define INIT_IOCTL #define INIT_IOCTL
#endif #endif

View File

@ -85,8 +85,11 @@ static void ioctl_table_fill() {
_(0x00008932, READ, struct_ifreq_sz); // SIOCDELMULTI _(0x00008932, READ, struct_ifreq_sz); // SIOCDELMULTI
_(0x00008940, NONE, 0); // SIOCADDRTOLD _(0x00008940, NONE, 0); // SIOCADDRTOLD
_(0x00008941, NONE, 0); // SIOCDELRTOLD _(0x00008941, NONE, 0); // SIOCDELRTOLD
#if (SANITIZER_LINUX && !SANITIZER_ANDROID) || SANITIZER_MAC
_(0x000089E0, WRITE, struct_sioc_vif_req_sz); // SIOCGETVIFCNT _(0x000089E0, WRITE, struct_sioc_vif_req_sz); // SIOCGETVIFCNT
_(0x000089E1, WRITE, struct_sioc_sg_req_sz); // SIOCGETSGCNT _(0x000089E1, WRITE, struct_sioc_sg_req_sz); // SIOCGETSGCNT
#endif
#if SANITIZER_LINUX #if SANITIZER_LINUX
_(0x00000000, NONE, 0); // FDCLRPRM _(0x00000000, NONE, 0); // FDCLRPRM

View File

@ -69,6 +69,7 @@
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID #endif // SANITIZER_LINUX && !SANITIZER_ANDROID
#if SANITIZER_ANDROID #if SANITIZER_ANDROID
#include <linux/kd.h>
#include <linux/mtio.h> #include <linux/mtio.h>
#endif #endif