X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fifconfig.c;h=f4ce313a482c197b83818616212931b09755dca0;hb=90cde91141ec61be4354d8deab21edb8fdf01022;hp=742d2ebe1a61d8e91e780401564a47d3f69fe789;hpb=d6b45d005530496e48325a6174ecdd889a17bfc1;p=tinc diff --git a/src/ifconfig.c b/src/ifconfig.c index 742d2ebe..f4ce313a 100644 --- a/src/ifconfig.c +++ b/src/ifconfig.c @@ -25,7 +25,7 @@ static long start; -#ifndef HAVE_MINGW +#ifndef HAVE_WINDOWS void ifconfig_header(FILE *out) { fprintf(out, "#!/bin/sh\n"); start = ftell(out); @@ -128,7 +128,7 @@ void ifconfig_address(FILE *out, const char *value) { return; } -#elif defined(HAVE_MINGW) || defined(HAVE_CYGWIN) +#elif defined(HAVE_WINDOWS) switch(address.type) { case SUBNET_MAC: @@ -136,11 +136,11 @@ void ifconfig_address(FILE *out, const char *value) { break; case SUBNET_IPV4: - fprintf(out, "netsh inetface ipv4 set address \"%%INTERFACE%%\" static %s\n", address_str); + fprintf(out, "netsh interface ipv4 set address \"%%INTERFACE%%\" static %s\n", address_str); break; case SUBNET_IPV6: - fprintf(out, "netsh inetface ipv6 set address \"%%INTERFACE%%\" %s\n", address_str); + fprintf(out, "netsh interface ipv6 set address \"%%INTERFACE%%\" %s\n", address_str); break; default: @@ -226,7 +226,7 @@ void ifconfig_route(FILE *out, const char *value) { } } -#elif defined(HAVE_MINGW) || defined(HAVE_CYGWIN) +#elif defined(HAVE_WINDOWS) if(*gateway_str) { switch(subnet.type) {