mirror of
https://github.com/hashcat/hashcat
synced 2024-11-28 05:21:38 +01:00
Some fixes for macOS
This commit is contained in:
parent
dc39deba0f
commit
915da5fee3
@ -31,7 +31,11 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <signal.h>
|
||||
#if defined (__linux__)
|
||||
#define SEND_FLAGS MSG_NOSIGNAL
|
||||
#else
|
||||
#define SEND_FLAGS 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
#if defined (_WIN)
|
||||
|
||||
#else
|
||||
#if defined (__linux__)
|
||||
const int 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;
|
||||
}
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
struct addrinfo hints;
|
||||
@ -1990,9 +1990,7 @@ void *brain_server_handle_client (void *p)
|
||||
|
||||
// client configuration
|
||||
|
||||
#if defined (_WIN)
|
||||
|
||||
#else
|
||||
#if defined (__linux__)
|
||||
const int 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;
|
||||
}
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
u32 brain_link_version;
|
||||
@ -2919,9 +2919,7 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if defined (_WIN)
|
||||
|
||||
#else
|
||||
#if defined (__linux__)
|
||||
const int 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;
|
||||
}
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
struct sockaddr_in sa;
|
||||
|
Loading…
Reference in New Issue
Block a user