From 6c17c1f559a68281427aa7413be7b6c262e90305 Mon Sep 17 00:00:00 2001 From: Ryan McCormick Date: Fri, 14 Jun 2024 22:53:49 -0700 Subject: [PATCH] Add windows typedef for ssize_t (#368) --- 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 {