Skip to content

Commit c8b188f

Browse files
authored
Add windows typedef for ssize_t (#368)
1 parent bfabfdb commit c8b188f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/pb_tensor.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ namespace py = pybind11;
3535
#endif
3636
#include "pb_tensor.h"
3737

38+
// WAR for undefined ssize_t on Windows: https://stackoverflow.com/a/35368387
39+
#if defined(_MSC_VER)
40+
#include <BaseTsd.h>
41+
typedef SSIZE_T ssize_t;
42+
#endif
3843

3944
namespace triton { namespace backend { namespace python {
4045

0 commit comments

Comments
 (0)