ompilation fixes

This commit is contained in:
Luca Deri 2020-08-06 19:28:39 +02:00
parent 29dd405b3c
commit 96c05490e9
3 changed files with 10 additions and 3 deletions

View File

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

View File

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

View File

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