Browse Source

updated for compilation with VS2015 (#739)

pull/742/head
skyformat99 3 years ago
committed by GitHub
parent
commit
6f63f401fe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      include/n2n_define.h
  2. 2
      src/n2n.c

8
include/n2n_define.h

@ -179,6 +179,14 @@ enum skip_add{SN_ADD = 0, SN_ADD_SKIP = 1, SN_ADD_ADDED = 2};
#define N2N_IFNAMSIZ 16 /* 15 chars * NULL */ #define N2N_IFNAMSIZ 16 /* 15 chars * NULL */
#endif #endif
#ifdef _MSC_VER
#define N2N_THREAD_RETURN_DATATYPE DWORD WINAPI
#define N2N_THREAD_PARAMETER_DATATYPE LPVOID
#else
#define N2N_THREAD_RETURN_DATATYPE void*
#define N2N_THREAD_PARAMETER_DATATYPE void*
#endif
#define SN_SELECTION_CRITERION_DATA_TYPE uint32_t #define SN_SELECTION_CRITERION_DATA_TYPE uint32_t
#define SN_SELECTION_CRITERION_BUF_SIZE 16 #define SN_SELECTION_CRITERION_BUF_SIZE 16

2
src/n2n.c

@ -313,7 +313,7 @@ int supernode2sock (n2n_sock_t *sn, const n2n_sn_name_t addrIn) {
} }
void *resolve_thread (void *p) { N2N_THREAD_RETURN_DATATYPE resolve_thread(N2N_THREAD_PARAMETER_DATATYPE p) {
#ifdef HAVE_PTHREAD #ifdef HAVE_PTHREAD
n2n_resolve_parameter_t *param = (n2n_resolve_parameter_t*)p; n2n_resolve_parameter_t *param = (n2n_resolve_parameter_t*)p;

Loading…
Cancel
Save