From ebc9911f18958f83cc31e56032ff60a7ac4aef23 Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Sun, 23 Oct 2022 16:52:33 +0200 Subject: [PATCH] fixes --- .github/workflows/build_all.yml | 2 +- source_modules/hermes_source/src/net.cpp | 4 ++-- source_modules/hermes_source/src/net.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 4802f5d1..4d476de2 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -87,7 +87,7 @@ jobs: run: brew update - name: Install dependencies - run: brew install libusb fftw glfw airspy airspyhf portaudio hackrf rtl-sdr libbladerf codec2 && pip3 install mako zstd uhd + run: brew install libusb fftw glfw airspy airspyhf portaudio hackrf rtl-sdr libbladerf codec2 uhd zstd && pip3 install mako - name: Install volk run: git clone --recursive https://github.com/gnuradio/volk && cd volk && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make -j3 && sudo make install && cd ../../ diff --git a/source_modules/hermes_source/src/net.cpp b/source_modules/hermes_source/src/net.cpp index 76d3e78a..3e92f435 100644 --- a/source_modules/hermes_source/src/net.cpp +++ b/source_modules/hermes_source/src/net.cpp @@ -165,7 +165,7 @@ namespace net { // Receive int addrLen = sizeof(sockaddr_in); - int err = ::recvfrom(sock, (char*)&data[read], maxLen - read, 0,(sockaddr*)(dest ? &dest->addr : NULL), dest ? &addrLen : NULL); + int err = ::recvfrom(sock, (char*)&data[read], maxLen - read, 0,(sockaddr*)(dest ? &dest->addr : NULL), (socklen_t*)(dest ? &addrLen : NULL)); if (err <= 0 && !WOULD_BLOCK) { close(); return err; @@ -232,7 +232,7 @@ namespace net { // Accept int addrLen = sizeof(sockaddr_in); - SockHandle_t s = ::accept(sock, (sockaddr*)(dest ? &dest->addr : NULL), dest ? &addrLen : NULL); + SockHandle_t s = ::accept(sock, (sockaddr*)(dest ? &dest->addr : NULL), (socklen_t*)(dest ? &addrLen : NULL)); if ((int)s < 0) { if (!WOULD_BLOCK) { stop(); } return NULL; diff --git a/source_modules/hermes_source/src/net.h b/source_modules/hermes_source/src/net.h index 8f9dc9ce..69b47187 100644 --- a/source_modules/hermes_source/src/net.h +++ b/source_modules/hermes_source/src/net.h @@ -21,6 +21,7 @@ namespace net { #ifdef _WIN32 typedef SOCKET SockHandle_t; + typedef int socklen_t; #else typedef int SockHandle_t; #endif