diff options
| author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-24 16:27:15 +0200 |
|---|---|---|
| committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-24 16:34:07 +0200 |
| commit | 609a81096ec95e56e4516e73529942e48ea7b23b (patch) | |
| tree | b166ef943a744962af812a6e61927b0dd87fe1b5 /src/utils/sha256.cpp | |
| parent | 2e1b6ac8453cd1579908f8712ca9a0069787b82f (diff) | |
Fixed compilation problem with GCC 4.4
Fix ported from the client.
Diffstat (limited to 'src/utils/sha256.cpp')
| -rw-r--r-- | src/utils/sha256.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/utils/sha256.cpp b/src/utils/sha256.cpp index d2aebae..4f292c9 100644 --- a/src/utils/sha256.cpp +++ b/src/utils/sha256.cpp @@ -71,10 +71,14 @@ #include "sha256.h" #include <memory.h> -#ifdef HAS_STDINT -#include <stdint.h> +#ifdef HAVE_CONFIG_H +#include "config.h" #endif -#ifndef HAS_STDINT + +#ifdef HAVE_STDINT_H +#include <stdint.h> +#else +typedef unsigned char uint8_t; typedef unsigned int uint32_t; #endif @@ -269,7 +273,7 @@ std::string SHA256Hash(const char *src, int len) return hash; } -std::string sha256(const std::string& string) +std::string sha256(const std::string &string) { return SHA256Hash(string.c_str(), string.length()); } |
