re-arrange include sequence to avoid a mingw introduced bug.
[oweals/tinc.git] / src / cygwin / device.c
index 4365399df44dcc3a0e7f85e9ec24ce93687dfed0..eaf50374fe02868bfa662e67fc4d447fb10e6bce 100644 (file)
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#include "system.h"
+#include "../system.h"
+#include "../net.h"
 
 #include <w32api/windows.h>
 #include <w32api/winioctl.h>
 
-#include "conf.h"
-#include "device.h"
-#include "logger.h"
-#include "net.h"
-#include "route.h"
-#include "utils.h"
-#include "xalloc.h"
+#include "../conf.h"
+#include "../device.h"
+#include "../logger.h"
+#include "../route.h"
+#include "../utils.h"
+#include "../xalloc.h"
 
-#include "mingw/common.h"
+#include "../mingw/common.h"
 
 int device_fd = -1;
 static HANDLE device_handle = INVALID_HANDLE_VALUE;
@@ -61,6 +61,9 @@ static bool setup_device(void) {
        get_config_string(lookup_config(config_tree, "Device"), &device);
        get_config_string(lookup_config(config_tree, "Interface"), &iface);
 
+       if(device && iface)
+               logger(LOG_WARNING, "Warning: both Device and Interface specified, results may not be as expected");
+
        /* Open registry and look for network adapters */
 
        if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, NETWORK_CONNECTIONS_KEY, 0, KEY_READ, &key)) {