mirror of
https://github.com/hashcat/hashcat
synced 2025-03-22 21:14:22 +01:00
Some fixes for macOS
This commit is contained in:
parent
dc39deba0f
commit
915da5fee3
@ -31,7 +31,11 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#if defined (__linux__)
|
||||||
#define SEND_FLAGS MSG_NOSIGNAL
|
#define SEND_FLAGS MSG_NOSIGNAL
|
||||||
|
#else
|
||||||
|
#define SEND_FLAGS 0
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "xxhash.h"
|
#include "xxhash.h"
|
||||||
|
18
src/brain.c
18
src/brain.c
@ -901,9 +901,7 @@ bool brain_client_connect (hc_device_param_t *device_param, const status_ctx_t *
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (_WIN)
|
#if defined (__linux__)
|
||||||
|
|
||||||
#else
|
|
||||||
const int one = 1;
|
const int one = 1;
|
||||||
|
|
||||||
if (setsockopt (brain_link_client_fd, SOL_TCP, TCP_NODELAY, &one, sizeof (one)) == -1)
|
if (setsockopt (brain_link_client_fd, SOL_TCP, TCP_NODELAY, &one, sizeof (one)) == -1)
|
||||||
@ -914,6 +912,8 @@ bool brain_client_connect (hc_device_param_t *device_param, const status_ctx_t *
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct addrinfo hints;
|
struct addrinfo hints;
|
||||||
@ -1990,9 +1990,7 @@ void *brain_server_handle_client (void *p)
|
|||||||
|
|
||||||
// client configuration
|
// client configuration
|
||||||
|
|
||||||
#if defined (_WIN)
|
#if defined (__linux__)
|
||||||
|
|
||||||
#else
|
|
||||||
const int one = 1;
|
const int one = 1;
|
||||||
|
|
||||||
if (setsockopt (client_fd, SOL_TCP, TCP_NODELAY, &one, sizeof (one)) == -1)
|
if (setsockopt (client_fd, SOL_TCP, TCP_NODELAY, &one, sizeof (one)) == -1)
|
||||||
@ -2003,6 +2001,8 @@ void *brain_server_handle_client (void *p)
|
|||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
u32 brain_link_version;
|
u32 brain_link_version;
|
||||||
@ -2919,9 +2919,7 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (_WIN)
|
#if defined (__linux__)
|
||||||
|
|
||||||
#else
|
|
||||||
const int one = 1;
|
const int one = 1;
|
||||||
|
|
||||||
if (setsockopt (server_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof (one)) == -1)
|
if (setsockopt (server_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof (one)) == -1)
|
||||||
@ -2937,6 +2935,8 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct sockaddr_in sa;
|
struct sockaddr_in sa;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user