summaryrefslogtreecommitdiff
path: root/core/network.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/network.h')
-rw-r--r--core/network.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/core/network.h b/core/network.h
index 894bedeb..4fa30905 100644
--- a/core/network.h
+++ b/core/network.h
@@ -39,8 +39,7 @@
39#include <winsock2.h> 39#include <winsock2.h>
40#include <windows.h> 40#include <windows.h>
41 41
42//we use libsodium (Portable version of NaCl) because stock NaCl doesn't compile on windows. 42#undef VANILLA_NACL//make sure on windows we use libsodium
43#include <sodium.h>
44 43
45#else //Linux includes 44#else //Linux includes
46 45
@@ -50,13 +49,21 @@
50#include <errno.h> 49#include <errno.h>
51#include <sys/time.h> 50#include <sys/time.h>
52 51
52
53#endif
54
55#ifndef VANILLA_NACL
56//we use libsodium by default
57#include <sodium.h>
58#else
59
53//TODO: Including stuff like this is bad. This needs fixing. 60//TODO: Including stuff like this is bad. This needs fixing.
54//We keep support for the original NaCl for now on UNIX like Operating Systems. 61//We keep support for the original NaCl for now.
55//Commented out for now 62#include "../nacl/build/Linux/include/amd64/crypto_box.h"
56//#include "../nacl/build/Linux/include/amd64/crypto_box.h"
57 63
58#endif 64#endif
59 65
66
60#define MAX_UDP_PACKET_SIZE 65507 67#define MAX_UDP_PACKET_SIZE 65507
61 68
62typedef union 69typedef union