From 6d2f2be8bb9be103b77edabe373ec5944088f7f6 Mon Sep 17 00:00:00 2001 From: Ryan McCormick Date: Fri, 14 Jun 2024 12:50:30 -0700 Subject: [PATCH] Add windows typedef for ssize_t --- src/pb_tensor.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pb_tensor.cc b/src/pb_tensor.cc index d9d47784..0915c1d9 100644 --- a/src/pb_tensor.cc +++ b/src/pb_tensor.cc @@ -35,6 +35,11 @@ namespace py = pybind11; #endif #include "pb_tensor.h" +// WAR for undefined ssize_t on Windows: https://stackoverflow.com/a/35368387 +#if defined(_MSC_VER) +#include +typedef SSIZE_T ssize_t; +#endif namespace triton { namespace backend { namespace python {