Merge remote-tracking branch 'dechamps/fsckwin' into 1.1
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 12 Apr 2015 13:35:37 +0000 (15:35 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 12 Apr 2015 13:35:37 +0000 (15:35 +0200)
src/fsck.c
src/net_setup.c
src/netutl.c

index 8df95ec..205a599 100644 (file)
@@ -155,7 +155,11 @@ static void check_conffile(const char *fname, bool server) {
 }
 
 int fsck(const char *argv0) {
+#ifdef HAVE_MINGW
+       int uid = 0;
+#else
        uid_t uid = getuid();
+#endif
 
        // Check that tinc.conf is readable.
 
index 83fbc2d..92aa5db 100644 (file)
@@ -667,7 +667,7 @@ static bool add_listen_address(char *address, bool bindto) {
        hint.ai_protocol = IPPROTO_TCP;
        hint.ai_flags = AI_PASSIVE;
 
-#ifdef HAVE_DECL_RES_INIT
+#if HAVE_DECL_RES_INIT
        res_init();
 #endif
        int err = getaddrinfo(address && *address ? address : NULL, port, &hint, &ai);
index 3ea5d4a..bff734e 100644 (file)
@@ -39,7 +39,7 @@ struct addrinfo *str2addrinfo(const char *address, const char *service, int sock
        hint.ai_family = addressfamily;
        hint.ai_socktype = socktype;
 
-#ifdef HAVE_DECL_RES_INIT
+#if HAVE_DECL_RES_INIT
        res_init();
 #endif
        err = getaddrinfo(address, service, &hint, &ai);