Replace MinGW with Windows to avoid ambiguities
[tinc] / src / control.c
index fc713c8..86e0f68 100644 (file)
@@ -22,9 +22,7 @@
 #include "conf.h"
 #include "control.h"
 #include "control_common.h"
-#include "graph.h"
 #include "logger.h"
-#include "meta.h"
 #include "names.h"
 #include "net.h"
 #include "netutl.h"
@@ -110,7 +108,7 @@ bool control_h(connection_t *c, const char *request) {
                        return control_return(c, REQ_DISCONNECT, -1);
                }
 
-               for list_each(connection_t, other, connection_list) {
+               for list_each(connection_t, other, &connection_list) {
                        if(strcmp(other->name, name)) {
                                continue;
                        }
@@ -187,7 +185,7 @@ bool init_control(void) {
        free(localhost);
        fclose(f);
 
-#ifndef HAVE_MINGW
+#ifndef HAVE_WINDOWS
        int unix_fd = socket(AF_UNIX, SOCK_STREAM, 0);
 
        if(unix_fd < 0) {
@@ -234,7 +232,7 @@ bool init_control(void) {
 }
 
 void exit_control(void) {
-#ifndef HAVE_MINGW
+#ifndef HAVE_WINDOWS
        unlink(unixsocketname);
        io_del(&unix_socket);
        close(unix_socket.fd);