test_fec doesn't compile
theicfire opened this issue · comments
I tried building test_fec
via the command make test_fec
, but I got some errors.
They said
fec_code’ was not declared in this scope
and
'byte' does not name a type
I fixed them both with this diff:
--- a/test/test_fec.cpp
+++ b/test/test_fec.cpp
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <string.h>
#include "fecpp.h"
+using byte = std::uint8_t;
/*
* compatibility stuff
@@ -77,7 +78,7 @@ my_malloc(int sz, const char *s)
*/
int
-test_decode(fec_code& code, size_t k, size_t index[], size_t sz,
+test_decode(fecpp::fec_code& code, size_t k, size_t index[], size_t sz,
const char *s)
{
int errors;
@@ -206,7 +207,7 @@ main(int argc, char *argv[])
for ( kk = KK ; kk > 2 ; kk-- )
{
- fec_code code(kk, lim);
+ fecpp::fec_code code(kk, lim);
ixs = (size_t*)my_malloc(kk * sizeof(size_t), "ixs" );
for (i=0; i<kk; i++) ixs[i] = kk - i ;
But I'm now having problems with:
error: no matching function for call to ‘fecpp::fec_code::encode(byte**&, byte*&, size_t&, size_t&)’
Does test_fec
work at all? It seems like it's not compatible with the rest of the code, from what I can tell.
Thank you!
Probably it was not updated when I recently changed to use C++11. And there is no CI :/ so I did not notice. Thanks for opening the issue, I'll take a look at this soon.
Bad news: This library is no longer maintained.
Good news: The same functionality (zfec-compatible forward error correction with SIMD optimizations) is available in Botan with randombit/botan#2866