mirror of
https://github.com/ntop/n2n.git
synced 2024-09-20 00:51:10 +02:00
Fix compilation on MacOS
This commit is contained in:
parent
dcd3801df5
commit
53e930db10
|
@ -155,11 +155,17 @@
|
||||||
#include "sn_selection.h"
|
#include "sn_selection.h"
|
||||||
#include "network_traffic_filter.h"
|
#include "network_traffic_filter.h"
|
||||||
|
|
||||||
/* ************************************** */
|
|
||||||
|
|
||||||
#include "header_encryption.h"
|
#include "header_encryption.h"
|
||||||
#include "tf.h"
|
#include "tf.h"
|
||||||
|
|
||||||
|
/* ************************************** */
|
||||||
|
|
||||||
|
#if !defined(SOL_TCP) && defined(IPPROTO_TCP)
|
||||||
|
#define SOL_TCP IPPROTO_TCP
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ************************************** */
|
||||||
|
|
||||||
#ifndef TRACE_ERROR
|
#ifndef TRACE_ERROR
|
||||||
#define TRACE_ERROR 0, __FILE__, __LINE__
|
#define TRACE_ERROR 0, __FILE__, __LINE__
|
||||||
#define TRACE_WARNING 1, __FILE__, __LINE__
|
#define TRACE_WARNING 1, __FILE__, __LINE__
|
||||||
|
|
|
@ -890,7 +890,7 @@ static ssize_t sendto_sock (n2n_edge_t *eee, const void * buf,
|
||||||
|
|
||||||
setsockopt(eee->sock, SOL_TCP, TCP_NODELAY, &value, sizeof(value));
|
setsockopt(eee->sock, SOL_TCP, TCP_NODELAY, &value, sizeof(value));
|
||||||
value = 1;
|
value = 1;
|
||||||
#ifndef WIN32
|
#if !defined(WIN32) && !defined(__APPLE__)
|
||||||
setsockopt(eee->sock, SOL_TCP, TCP_CORK, &value, sizeof(value));
|
setsockopt(eee->sock, SOL_TCP, TCP_CORK, &value, sizeof(value));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -908,7 +908,7 @@ static ssize_t sendto_sock (n2n_edge_t *eee, const void * buf,
|
||||||
if(eee->conf.connect_tcp) {
|
if(eee->conf.connect_tcp) {
|
||||||
value = 1; /* value should still be set to 1 */
|
value = 1; /* value should still be set to 1 */
|
||||||
setsockopt(eee->sock, SOL_TCP, TCP_NODELAY, &value, sizeof(value));
|
setsockopt(eee->sock, SOL_TCP, TCP_NODELAY, &value, sizeof(value));
|
||||||
#ifndef WIN32
|
#if !defined(WIN32) && !defined(__APPLE__)
|
||||||
value = 0;
|
value = 0;
|
||||||
setsockopt(eee->sock, SOL_TCP, TCP_CORK, &value, sizeof(value));
|
setsockopt(eee->sock, SOL_TCP, TCP_CORK, &value, sizeof(value));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -151,7 +151,7 @@ static ssize_t sendto_sock(n2n_sn_t *sss,
|
||||||
|
|
||||||
setsockopt(socket_fd, SOL_TCP, TCP_NODELAY, &value, sizeof(value));
|
setsockopt(socket_fd, SOL_TCP, TCP_NODELAY, &value, sizeof(value));
|
||||||
value = 1;
|
value = 1;
|
||||||
#ifndef WIN32
|
#if !defined(WIN32) && !defined(__APPLE__)
|
||||||
setsockopt(socket_fd, SOL_TCP, TCP_CORK, &value, sizeof(value));
|
setsockopt(socket_fd, SOL_TCP, TCP_CORK, &value, sizeof(value));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ static ssize_t sendto_sock(n2n_sn_t *sss,
|
||||||
if((socket_fd >= 0) && (socket_fd != sss->sock)) {
|
if((socket_fd >= 0) && (socket_fd != sss->sock)) {
|
||||||
value = 1; /* value should still be set to 1 */
|
value = 1; /* value should still be set to 1 */
|
||||||
setsockopt(socket_fd, SOL_TCP, TCP_NODELAY, &value, sizeof(value));
|
setsockopt(socket_fd, SOL_TCP, TCP_NODELAY, &value, sizeof(value));
|
||||||
#ifndef WIN32
|
#if !defined(WIN32) && !defined(__APPLE__)
|
||||||
value = 0;
|
value = 0;
|
||||||
setsockopt(socket_fd, SOL_TCP, TCP_CORK, &value, sizeof(value));
|
setsockopt(socket_fd, SOL_TCP, TCP_CORK, &value, sizeof(value));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user