X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Finvitation.c;h=c008be2ac7a6c7d2cbbca62d1845b040716a723d;hb=0fe69908838248c28624beb540257892db6bdcbd;hp=d1e1e61d07cdf6ad830db6fb7f17fcf334d86ae1;hpb=cfc9fee931c70554353ce6c4acc3407baac08745;p=tinc diff --git a/src/invitation.c b/src/invitation.c index d1e1e61d..c008be2a 100644 --- a/src/invitation.c +++ b/src/invitation.c @@ -34,6 +34,7 @@ #include "tincctl.h" #include "utils.h" #include "xalloc.h" +#include "random.h" #include "ed25519/sha512.h" @@ -996,7 +997,7 @@ ask_netname: char filename2[PATH_MAX]; snprintf(filename, sizeof(filename), "%s" SLASH "tinc-up.invitation", confbase); -#ifdef HAVE_MINGW +#ifdef HAVE_WINDOWS snprintf(filename2, sizeof(filename2), "%s" SLASH "tinc-up.bat", confbase); #else snprintf(filename2, sizeof(filename2), "%s" SLASH "tinc-up", confbase); @@ -1028,7 +1029,7 @@ ask_netname: if(response == 'e') { char *command; -#ifndef HAVE_MINGW +#ifndef HAVE_WINDOWS const char *editor = getenv("VISUAL"); if(!editor) { @@ -1358,7 +1359,7 @@ next: continue; } -#if HAVE_MINGW +#if HAVE_WINDOWS // If socket has been shut down, recv() on Windows returns -1 and sets sockerrno // to WSAESHUTDOWN, while on UNIX-like operating systems recv() returns 0, so we