From ff116e799e4185aece86ad4894ed9cb40c381c6a Mon Sep 17 00:00:00 2001 From: Rudi Cilibrasi Date: Sun, 23 Oct 2016 12:31:01 -0700 Subject: [PATCH] Fix C linkage for C++ --- dev_miner.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dev_miner.h b/dev_miner.h index e36a8fd..5677e95 100644 --- a/dev_miner.h +++ b/dev_miner.h @@ -23,11 +23,23 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif void Blake2PrepareMidstate4(void *midstate, uchar *input); +#ifdef __cplusplus +} +#endif //midstate: 256 bytes of buffer for output midstate, aligned by 32 //input: 140 bytes header, preferably aligned by 8 +#ifdef __cplusplus +extern "C" { +#endif void Blake2Run4(uchar *hashout, void *midstate, u32 indexctr); +#ifdef __cplusplus +} +#endif //hashout: hash output buffer: 4*64 bytes //midstate: 256 bytes from Blake2PrepareMidstate4 //indexctr: For n=200, k=9: {0, 4, 8, ..., 1048572}