Browse Source

ompilation fixes

pull/355/head
Luca Deri 4 years ago
parent
commit
96c05490e9
  1. 7
      include/n2n.h
  2. 2
      src/edge_utils.c
  3. 4
      src/random_numbers.c

7
include/n2n.h

@ -37,7 +37,12 @@
/* Moved here to define _CRT_SECURE_NO_WARNINGS before all the including takes place */ /* Moved here to define _CRT_SECURE_NO_WARNINGS before all the including takes place */
#ifdef WIN32 #ifdef WIN32
#include "win32/n2n_win32.h" #include "win32/n2n_win32.h"
#ifdef _MSC_VER
#include "config.h" /* Visual C++ */
#else
#include "win32/winconfig.h" #include "win32/winconfig.h"
#endif
#define N2N_CAN_NAME_IFACE 1 #define N2N_CAN_NAME_IFACE 1
#undef N2N_HAVE_DAEMON #undef N2N_HAVE_DAEMON
#undef N2N_HAVE_SETUID #undef N2N_HAVE_SETUID
@ -47,6 +52,8 @@
#endif #endif
#endif #endif
#define PACKAGE_BUILDDATE (__DATE__ " " __TIME__) #define PACKAGE_BUILDDATE (__DATE__ " " __TIME__)
#include <time.h> #include <time.h>

2
src/edge_utils.c

@ -1449,7 +1449,7 @@ void edge_send_packet2net(n2n_edge_t * eee,
pkt.compression = N2N_COMPRESSION_ID_NONE; pkt.compression = N2N_COMPRESSION_ID_NONE;
if(eee->conf.compression) { if(eee->conf.compression) {
uint8_t * compression_buffer; uint8_t * compression_buffer = NULL;
int32_t compression_len; int32_t compression_len;
switch (eee->conf.compression) { switch (eee->conf.compression) {

4
src/random_numbers.c

@ -98,8 +98,8 @@ uint64_t n2n_rand () {
state yet, a call to n2n_srand ( n2n_seed() ) would do. */ state yet, a call to n2n_srand ( n2n_seed() ) would do. */
uint64_t n2n_seed (void) { uint64_t n2n_seed (void) {
uint64_t seed; uint64_t seed = 0;
uint64_t ret; uint64_t ret = 0;
size_t i; size_t i;
#ifdef SYS_getrandom #ifdef SYS_getrandom

Loading…
Cancel
Save