mirror of
https://github.com/hashcat/hashcat.git
synced 2025-06-09 17:48:51 +00:00
Fix locking.c warnings when compiling on windows
This commit is contained in:
parent
1c8847499d
commit
eeb3c01468
@ -13,16 +13,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#if defined (F_SETLKW)
|
|
||||||
|
|
||||||
int lock_file (FILE *fp);
|
int lock_file (FILE *fp);
|
||||||
void unlock_file (FILE *fp);
|
void unlock_file (FILE *fp);
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define lock_file(dummy) 0
|
|
||||||
#define unlock_file(dummy)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _LOCKING_H
|
#endif // _LOCKING_H
|
||||||
|
@ -38,4 +38,18 @@ void unlock_file (FILE *fp)
|
|||||||
fcntl (fileno (fp), F_SETLK, &lock);
|
fcntl (fileno (fp), F_SETLK, &lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int lock_file (MAYBE_UNUSED FILE *fp)
|
||||||
|
{
|
||||||
|
// we should put windows specific code here
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void unlock_file (MAYBE_UNUSED FILE *fp)
|
||||||
|
{
|
||||||
|
// we should put windows specific code here
|
||||||
|
}
|
||||||
|
|
||||||
#endif // F_SETLKW
|
#endif // F_SETLKW
|
||||||
|
Loading…
Reference in New Issue
Block a user