Fix compilation without deprecated OpenSSL APIs
[tinc] / src / net_setup.c
index 8c43b39..f26007b 100644 (file)
@@ -27,6 +27,7 @@
 #include <openssl/rand.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
+#include <openssl/bn.h>
 
 #include "avl_tree.h"
 #include "conf.h"
@@ -239,7 +240,7 @@ static bool read_rsa_private_key(void) {
                return false;
        }
 
-#if !defined(HAVE_MINGW) && !defined(HAVE___CYGWIN32__)
+#if !defined(HAVE_MINGW) && !defined(HAVE_CYGWIN)
        struct stat s;
 
        if(!fstat(fileno(fp), &s)) {
@@ -860,7 +861,7 @@ static bool setup_myself(void) {
 #ifdef HAVE_MINGW
        Sleep(1000);
 #endif
-#ifdef HAVE___CYGWIN32__
+#ifdef HAVE_CYGWIN
        sleep(1);
 #endif
        execute_script("tinc-up", envp);