diff --git a/common_func.c b/common_func.c index 4ef81021..63c41eef 100644 --- a/common_func.c +++ b/common_func.c @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include "win_utils.h" #include "parse_cmdline.h" diff --git a/common_func.h b/common_func.h index fcc95165..3a945826 100644 --- a/common_func.h +++ b/common_func.h @@ -22,6 +22,7 @@ #include #include #include /* for time_t */ +#include /* for wchar_t */ #ifndef _WIN32 #include /* for timeval */ diff --git a/file_set.c b/file_set.c index e70f86e7..c0612297 100644 --- a/file_set.c +++ b/file_set.c @@ -23,7 +23,7 @@ static unsigned file_set_make_hash(const char* string) { unsigned hash; - if(rhash_msg(RHASH_CRC32, string, strlen(string), (unsigned char*)hash) < 0) + if(rhash_msg(RHASH_CRC32, string, strlen(string), (unsigned char*)&hash) < 0) return 0; return hash; } diff --git a/librhash/torrent.c b/librhash/torrent.c index 72309019..d66041ce 100644 --- a/librhash/torrent.c +++ b/librhash/torrent.c @@ -359,7 +359,7 @@ static void bt_bencode_pieces(torrent_ctx* ctx) * @param ctx the torrent algorithm context * @param text the null-terminated string to append */ -void bt_str_append(torrent_ctx *ctx, const char* text) +static void bt_str_append(torrent_ctx *ctx, const char* text) { size_t length = strlen(text); diff --git a/librhash/util.h b/librhash/util.h index 8ed3851f..9da27866 100644 --- a/librhash/util.h +++ b/librhash/util.h @@ -2,8 +2,6 @@ #ifndef UTIL_H #define UTIL_H -#include /* for wchar_t */ - #ifdef __cplusplus extern "C" { #endif