mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-08 23:01:14 +00:00
add workaround for zlib with cygwin build (v2)
This commit is contained in:
parent
9673dedebf
commit
e86cbf426a
@ -62,6 +62,10 @@ bool hc_string_is_digit (const char *s);
|
||||
void hc_string_trim_trailing (char *s);
|
||||
void hc_string_trim_leading (char *s);
|
||||
|
||||
#if defined (__CYGWIN__)
|
||||
int _wopen(const char *path, int oflag, ...);
|
||||
#endif
|
||||
|
||||
bool hc_fopen (HCFILE *fp, const char *path, char *mode);
|
||||
int hc_fscanf (HCFILE *fp, const char *format, void *ptr);
|
||||
int hc_fprintf (HCFILE *fp, const char *format, ...);
|
||||
|
@ -178,12 +178,8 @@ endif
|
||||
|
||||
## because ZLIB
|
||||
ifeq ($(USE_SYSTEM_ZLIB),0)
|
||||
ifeq ($(UNAME),CYGWIN)
|
||||
CFLAGS_ZLIB += -Wno-implicit-fallthrough -UWIDECHAR
|
||||
else
|
||||
CFLAGS_ZLIB += -Wno-implicit-fallthrough
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG),0)
|
||||
CFLAGS += -O2
|
||||
|
12
src/shared.c
12
src/shared.c
@ -602,6 +602,18 @@ void hc_string_trim_trailing (char *s)
|
||||
s[new_len] = 0;
|
||||
}
|
||||
|
||||
#if defined (__CYGWIN__)
|
||||
// workaround for zlib with cygwin build
|
||||
int _wopen(const char *path, int oflag, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start (ap, oflag);
|
||||
int r = open (path, oflag, ap);
|
||||
va_end (ap);
|
||||
return r;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool hc_fopen (HCFILE *fp, const char *path, char *mode)
|
||||
{
|
||||
unsigned char check[3] = { 0 };
|
||||
|
Loading…
Reference in New Issue
Block a user