From 143287f35723b624a5720f73c7b842a7c3145366 Mon Sep 17 00:00:00 2001
From: Constantin Papizh <p_const@bk.ru>
Date: Thu, 29 Oct 2020 09:28:07 +0300
Subject: [PATCH] Compile fixed

---
 dap-sdk/crypto/libdap-crypto.pri                          | 5 +++--
 .../src/XKCP/lib/high/Keccak/FIPS202/SimpleFIPS202.h      | 8 ++++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/dap-sdk/crypto/libdap-crypto.pri b/dap-sdk/crypto/libdap-crypto.pri
index 309dff1f71..f7245ad1a3 100755
--- a/dap-sdk/crypto/libdap-crypto.pri
+++ b/dap-sdk/crypto/libdap-crypto.pri
@@ -17,7 +17,8 @@ include (src/newhope/newhope.pri)
 
 DEFINES += KeccakP1600timesN_excluded
 
-HEADERS += $$PWD/include/dap_enc.h \
+HEADERS += $$PWD/src/XKCP/lib/common/config.h \
+    $$PWD/include/dap_enc.h \
     $$PWD/include/dap_enc_base64.h \
     $$PWD/include/dap_enc_iaes.h \
     $$PWD/include/dap_enc_oaes.h \
@@ -78,4 +79,4 @@ SOURCES += $$PWD/src/dap_enc.c \
     $$PWD/src/XKCP/lib/high/Keccak/SP800-185/SP800-185.inc
 
 
-INCLUDEPATH += $$PWD/include $$PWD/../ $$PWD/src $$PWD/src/XKCP/lib/high/Keccak/FIPS202 $$PWD/src/XKCP/lib/high/Keccak/SP800-185 $$PWD/src/XKCP/lib/high/common
+INCLUDEPATH += $$PWD/include $$PWD/../ $$PWD/src $$PWD/src/XKCP/lib/high/Keccak/FIPS202 $$PWD/src/XKCP/lib/high/Keccak/SP800-185 $$PWD/src/XKCP/lib/high/common $$PWD/src/XKCP/lib/common
diff --git a/dap-sdk/crypto/src/XKCP/lib/high/Keccak/FIPS202/SimpleFIPS202.h b/dap-sdk/crypto/src/XKCP/lib/high/Keccak/FIPS202/SimpleFIPS202.h
index ec4644030d..1713a46e71 100644
--- a/dap-sdk/crypto/src/XKCP/lib/high/Keccak/FIPS202/SimpleFIPS202.h
+++ b/dap-sdk/crypto/src/XKCP/lib/high/Keccak/FIPS202/SimpleFIPS202.h
@@ -22,6 +22,10 @@ http://creativecommons.org/publicdomain/zero/1.0/
 
 #include <string.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** Implementation of the SHAKE128 extendable output function (XOF) [FIPS 202].
   * @param  output          Pointer to the output buffer.
   * @param  outputByteLen   The desired number of output bytes.
@@ -76,4 +80,8 @@ int SHA3_512(unsigned char *output, const unsigned char *input, size_t inputByte
 #error This requires an implementation of Keccak-p[1600]
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
-- 
GitLab