diff --git a/runtime/core/portable_type/tensor.h b/runtime/core/portable_type/tensor.h index 6006bddaaa..6e952e30b9 100644 --- a/runtime/core/portable_type/tensor.h +++ b/runtime/core/portable_type/tensor.h @@ -9,7 +9,6 @@ #pragma once #include -#include // TODO(T126923429): Include size_t, ssize_t #include diff --git a/runtime/core/portable_type/tensor_impl.h b/runtime/core/portable_type/tensor_impl.h index 09ee744ae7..19977b71e0 100644 --- a/runtime/core/portable_type/tensor_impl.h +++ b/runtime/core/portable_type/tensor_impl.h @@ -8,8 +8,6 @@ #pragma once -#include // TODO(T126923429): Include size_t, ssize_t - #include #include #include diff --git a/runtime/platform/compiler.h b/runtime/platform/compiler.h index f370cd110b..c7f603756c 100644 --- a/runtime/platform/compiler.h +++ b/runtime/platform/compiler.h @@ -138,6 +138,14 @@ #endif #endif // ifndef +// Define size_t and ssize_t. +#ifndef _WIN32 +#include +#else +#include +using ssize_t = ptrdiff_t; +#endif + // DEPRECATED: Use the non-underscore-prefixed versions instead. // TODO(T199005537): Remove these once all users have stopped using them. #define __ET_DEPRECATED ET_DEPRECATED