Skip to content

Commit

Permalink
Disable hostname discovery on MinGW
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Feb 6, 2014
1 parent 68e8a01 commit 405db07
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.c
Expand Up @@ -40,14 +40,14 @@
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/utsname.h>
#include <sys/types.h>
#ifdef LIBPROXY_HDR
#include LIBPROXY_HDR
#endif
#include <getopt.h>
#include <time.h>
#ifndef _WIN32
#include <sys/utsname.h>
#include <pwd.h>
#include <termios.h>
#endif
Expand Down Expand Up @@ -568,7 +568,6 @@ static int next_option(int argc, char **argv, char **config_arg)
int main(int argc, char **argv)
{
struct openconnect_info *vpninfo;
struct utsname utsbuf;
struct sigaction sa;
char *urlpath = NULL;
char *proxy = getenv("https_proxy");
Expand All @@ -585,6 +584,7 @@ int main(int argc, char **argv)
int reconnect_timeout = 300;
int ret;
#ifndef _WIN32
struct utsname utsbuf;
uid_t uid = getuid();
int use_syslog = 0;
int script_tun = 0;
Expand All @@ -611,10 +611,12 @@ int main(int argc, char **argv)
}

vpninfo->cbdata = vpninfo;
#ifndef _WIN32
if (!uname(&utsbuf)) {
free(vpninfo->localname);
vpninfo->localname = xstrdup(utsbuf.nodename);
}
#endif

while ((opt = next_option(argc, argv, &config_arg))) {

Expand Down

0 comments on commit 405db07

Please sign in to comment.