mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-22 01:20:56 -05:00
MacOS build fixes
This commit is contained in:
parent
84daf16a4b
commit
23c65fc8f3
@ -8,6 +8,7 @@
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <tuple>
|
||||
|
@ -397,9 +397,11 @@ void DATVDemodSink::CleanUpDATVFramework()
|
||||
delete (leansdr::s2_fecdec<bool, leansdr::hard_sb>*) r_fecdec;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (r_fecdecsoft != nullptr) {
|
||||
delete (leansdr::s2_fecdec_soft<leansdr::llr_t,leansdr::llr_sb>*) r_fecdecsoft;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (r_fecdechelper != nullptr) {
|
||||
delete (leansdr::s2_fecdec_helper<leansdr::llr_t,leansdr::llr_sb>*) r_fecdechelper;
|
||||
|
@ -18,17 +18,22 @@ namespace ldpctool {
|
||||
class LDPCUtil
|
||||
{
|
||||
public:
|
||||
#ifndef _MSC_VER
|
||||
#if defined(__APPLE__)
|
||||
// Recent versions of MacOS support aligned_alloc, but Mojave doesn't
|
||||
static void *aligned_malloc(size_t alignment, size_t size)
|
||||
{
|
||||
return aligned_alloc(alignment, size);
|
||||
void *p = nullptr;
|
||||
|
||||
posix_memalign(&p, alignment, size);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
static void aligned_free(void *mem)
|
||||
{
|
||||
free(mem);
|
||||
}
|
||||
#else
|
||||
#elif defined(_MSC_VER)
|
||||
static void *aligned_malloc(size_t alignment, size_t size)
|
||||
{
|
||||
return _aligned_malloc(size, alignment);
|
||||
@ -38,6 +43,16 @@ public:
|
||||
{
|
||||
_aligned_free(mem);
|
||||
}
|
||||
#else
|
||||
static void *aligned_malloc(size_t alignment, size_t size)
|
||||
{
|
||||
return aligned_alloc(alignment, size);
|
||||
}
|
||||
|
||||
static void aligned_free(void *mem)
|
||||
{
|
||||
free(mem);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -3046,6 +3046,8 @@ struct s2_fecdec : runnable
|
||||
pipewriter<int> *bitcount, *errcount;
|
||||
}; // s2_fecdec
|
||||
|
||||
#ifdef LINUX
|
||||
|
||||
// Soft LDPC decoder
|
||||
// Internally implemented LDPC tool. Replaces external LDPC decoder
|
||||
|
||||
@ -3195,6 +3197,8 @@ private:
|
||||
s2_bbscrambling bbscrambling;
|
||||
}; // s2_fecdec_soft
|
||||
|
||||
#endif
|
||||
|
||||
// External LDPC decoder
|
||||
// Spawns a user-specified command, FEC frames on stdin/stdout.
|
||||
template <typename T, int _SIZE>
|
||||
|
Loading…
Reference in New Issue
Block a user