diff --git a/host/hackrf-tools/src/hackrf_cpldjtag.c b/host/hackrf-tools/src/hackrf_cpldjtag.c index 5e0bfcb0..fe3bce23 100644 --- a/host/hackrf-tools/src/hackrf_cpldjtag.c +++ b/host/hackrf-tools/src/hackrf_cpldjtag.c @@ -31,7 +31,11 @@ #include #ifdef _MSC_VER -typedef int ssize_t; +#ifdef _WIN64 +typedef int64_t ssize_t; +#else +typedef int32_t ssize_t; +#endif #endif /* input file shouldn't be any longer than this */ #define MAX_XSVF_LENGTH 0x10000 diff --git a/host/hackrf-tools/src/hackrf_spiflash.c b/host/hackrf-tools/src/hackrf_spiflash.c index f97f2875..ba2c224e 100644 --- a/host/hackrf-tools/src/hackrf_spiflash.c +++ b/host/hackrf-tools/src/hackrf_spiflash.c @@ -36,7 +36,11 @@ typedef int bool; #endif #ifdef _MSC_VER -typedef int ssize_t; +#ifdef _WIN64 +typedef int64_t ssize_t; +#else +typedef int32_t ssize_t; +#endif #endif /* 8 Mbit flash */ diff --git a/host/hackrf-tools/src/hackrf_transfer.c b/host/hackrf-tools/src/hackrf_transfer.c index 66e8fbc5..0f2923a3 100644 --- a/host/hackrf-tools/src/hackrf_transfer.c +++ b/host/hackrf-tools/src/hackrf_transfer.c @@ -43,7 +43,13 @@ typedef int bool; #include #ifdef _MSC_VER -typedef int ssize_t; + +#ifdef _WIN64 +typedef int64_t ssize_t; +#else +typedef int32_t ssize_t; +#endif + #define strtoull _strtoui64 #define snprintf _snprintf