aboutsummaryrefslogtreecommitdiff
path: root/src/lib/third_party/include
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2023-12-23 09:15:42 +0100
committerLuca Deri <deri@ntop.org>2023-12-23 09:15:42 +0100
commitcaa223d2baefb3ffb0bfcec6230791e0e39ef23d (patch)
treeb5178653d5593ce33b40836ae2675ea63b27afd6 /src/lib/third_party/include
parent5c7200f2bb763bfcd4e0636aebb88573e97bbcf3 (diff)
Changes to avoid type redefinition on windows
Diffstat (limited to 'src/lib/third_party/include')
-rw-r--r--src/lib/third_party/include/ndpi_sha256.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/third_party/include/ndpi_sha256.h b/src/lib/third_party/include/ndpi_sha256.h
index 0525f3fef..730c2b6b3 100644
--- a/src/lib/third_party/include/ndpi_sha256.h
+++ b/src/lib/third_party/include/ndpi_sha256.h
@@ -11,19 +11,18 @@
/*************************** HEADER FILES ***************************/
#include <stddef.h>
+#include "ndpi_typedefs.h"
/****************************** MACROS ******************************/
#define SHA256_BLOCK_SIZE 32 // SHA256 outputs a 32 byte digest
/**************************** DATA TYPES ****************************/
-typedef unsigned char BYTE; // 8-bit byte
-typedef unsigned int WORD; // 32-bit word, change to "long" for 16-bit machines
typedef struct {
- BYTE data[64];
- WORD datalen;
+ u_int8_t data[64];
+ u_int32_t datalen;
unsigned long long bitlen;
- WORD state[8];
+ u_int32_t state[8];
} SHA256_CTX;
/*********************** FUNCTION DECLARATIONS **********************/