From 419b693f9d1140619c4873218373419927c8edef Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 9 Aug 2023 17:25:53 -0700 Subject: [PATCH 1/3] fix stdcall warnings under clang32/64 Signed-off-by: Rosen Penev --- include/backend.h | 2 ++ include/brain.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/backend.h b/include/backend.h index 117452740..ce1e9cfe4 100644 --- a/include/backend.h +++ b/include/backend.h @@ -93,7 +93,9 @@ int run_kernel_decompress (hashcat_ctx_t *hashcat_ctx, hc_devi int run_copy (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 pws_cnt); int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 pws_pos, const u64 pws_cnt); +HC_API_CALL void *hook12_thread (void *p); +HC_API_CALL void *hook23_thread (void *p); #endif // HC_BACKEND_H diff --git a/include/brain.h b/include/brain.h index 9ad0b5c1a..783a0d4cc 100644 --- a/include/brain.h +++ b/include/brain.h @@ -240,7 +240,9 @@ int brain_server_sort_hash_long (const void *v1, const void *v2); int brain_server_sort_hash_short (const void *v1, const void *v2); int brain_server_sort_hash_unique (const void *v1, const void *v2); void brain_server_handle_signal (int signo); +HC_API_CALL void *brain_server_handle_client (void *p); +HC_API_CALL void *brain_server_handle_dumps (void *p); void brain_server_db_hash_init (brain_server_db_hash_t *brain_server_db_hash, const u32 brain_session); bool brain_server_db_hash_realloc (brain_server_db_hash_t *brain_server_db_hash, const i64 new_long_cnt); From 2e7085f9a7edef19f9c7bea1ac161fdfab95bdf2 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 9 Aug 2023 17:29:50 -0700 Subject: [PATCH 2/3] silence clang32/64 warning about sign comparisons Signed-off-by: Rosen Penev --- src/shared.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/shared.c b/src/shared.c index e301523da..53902755a 100644 --- a/src/shared.c +++ b/src/shared.c @@ -19,6 +19,10 @@ #include #endif +#if defined (_WIN) +#include +#endif + static const char *const PA_000 = "OK"; static const char *const PA_001 = "Ignored due to comment"; static const char *const PA_002 = "Ignored due to zero length"; @@ -908,7 +912,11 @@ int select_read_timeout (int sockfd, const int sec) fd_set fds; FD_ZERO (&fds); +#if defined(_WIN) + FD_SET ((SOCKET)sockfd, &fds); +#else FD_SET (sockfd, &fds); +#endif return select (sockfd + 1, &fds, NULL, NULL, &tv); } @@ -923,7 +931,11 @@ int select_write_timeout (int sockfd, const int sec) fd_set fds; FD_ZERO (&fds); +#if defined(_WIN) + FD_SET ((SOCKET)sockfd, &fds); +#else FD_SET (sockfd, &fds); +#endif return select (sockfd + 1, NULL, &fds, NULL, &tv); } From c6b49de852ce6e81d099aab912bef49b99873c55 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 9 Aug 2023 17:44:21 -0700 Subject: [PATCH 3/3] include winsock2 instead of 1 2 is included elsewhere. No need to also include 1. Signed-off-by: Rosen Penev --- include/dispatch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dispatch.h b/include/dispatch.h index dccdf3436..fcccad950 100644 --- a/include/dispatch.h +++ b/include/dispatch.h @@ -8,7 +8,7 @@ #ifdef WITH_BRAIN #if defined (_WIN) -#include +#include #define SEND_FLAGS 0 #endif