1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-24 23:48:19 +00:00

Fix compile error on MSYS2 console

This commit is contained in:
Jens Steube 2025-07-09 15:54:03 +02:00
parent ad17d36270
commit 02a439ce02

View File

@ -17,6 +17,13 @@
#include "timer.h" #include "timer.h"
#include "terminal.h" #include "terminal.h"
#if defined (_POSIX)
#include <sys/utsname.h>
#if !defined (__APPLE__)
#include <sys/sysinfo.h>
#endif
#endif
static const size_t MAXIMUM_EXAMPLE_HASH_LENGTH = 200; static const size_t MAXIMUM_EXAMPLE_HASH_LENGTH = 200;
static const size_t TERMINAL_LINE_LENGTH = 79; static const size_t TERMINAL_LINE_LENGTH = 79;
@ -1253,7 +1260,7 @@ void backend_info (hashcat_ctx_t *hashcat_ctx)
printf ("\"SystemInfo\": { "); printf ("\"SystemInfo\": { ");
} }
#if defined (_WIN) || defined (__CYGWIN__) || defined (__MSYS__) #if defined (_WIN)
// Get Windows system information // Get Windows system information
SYSTEM_INFO sysinfo; SYSTEM_INFO sysinfo;
OSVERSIONINFO osvi; OSVERSIONINFO osvi;
@ -1311,6 +1318,7 @@ void backend_info (hashcat_ctx_t *hashcat_ctx)
printf ("\"Model\": \"%s\" } ", "N/A"); printf ("\"Model\": \"%s\" } ", "N/A");
printf ("}, "); printf ("}, ");
} }
#else #else
struct utsname utsbuf; struct utsname utsbuf;
@ -1320,7 +1328,7 @@ void backend_info (hashcat_ctx_t *hashcat_ctx)
char *hw_model_buf = NULL; char *hw_model_buf = NULL;
#if !defined (__linux__) #if !defined (__linux__) && !defined (__CYGWIN__) && !defined (__MSYS__)
size_t hw_model_len = 0; size_t hw_model_len = 0;