diff options
author | Josh Blum <josh@joshknows.com> | 2015-12-06 15:49:44 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2015-12-06 15:49:44 -0800 |
commit | 9ceadfb645f2aadc7e86b87a374340a928af42da (patch) | |
tree | 6a0fcca60b7ab4df43219ac99c8a93e3e38b6f9b | |
parent | 86ad584204762eeb01f07daa683673f1ec3f1df5 (diff) |
rtl_tcp: fix ssize_t definition for MSVC
This was actually causing a cryptic compile error because of the define.
The fix was to typedef ssize_t as ptrdiff_t, the same as bladerf_common.h
-rw-r--r-- | lib/rtl_tcp/rtl_tcp_source_f.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rtl_tcp/rtl_tcp_source_f.h b/lib/rtl_tcp/rtl_tcp_source_f.h index d1d918c..84ac57a 100644 --- a/lib/rtl_tcp/rtl_tcp_source_f.h +++ b/lib/rtl_tcp/rtl_tcp_source_f.h @@ -42,7 +42,10 @@ typedef char* optval_t; typedef void* optval_t;
#endif
-#define ssize_t int
+#ifdef _MSC_VER
+#include <cstddef>
+typedef ptrdiff_t ssize_t;
+#endif //_MSC_VER
/* copied from rtl sdr */
enum rtlsdr_tuner {
|