Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed compilation issues in windows
[dwmw2: Hide uid_csd and uid_csd_given too]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Nikos Mavrogiannopoulos authored and David Woodhouse committed Jan 22, 2016
1 parent a918f00 commit ba84b55
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions dtls.c
Expand Up @@ -1265,6 +1265,7 @@ static int detect_mtu_ipv6(struct openconnect_info *vpninfo, unsigned char *buf)
break;
} while(max_resends-- > 0);

#ifndef _WIN32
/* If we received back our DPD packet, do nothing; otherwise,
* attempt to get MTU from the ICMP6 packet we received */
if (ret <= 0) {
Expand All @@ -1282,6 +1283,9 @@ static int detect_mtu_ipv6(struct openconnect_info *vpninfo, unsigned char *buf)
}
}
}
#else
mtu6_fail:
#endif

return cur;
fail:
Expand Down
2 changes: 2 additions & 0 deletions library.c
Expand Up @@ -466,8 +466,10 @@ int openconnect_get_ip_info(struct openconnect_info *vpninfo,
int openconnect_setup_csd(struct openconnect_info *vpninfo, uid_t uid,
int silent, const char *wrapper)
{
#ifndef _WIN32
vpninfo->uid_csd = uid;
vpninfo->uid_csd_given = silent ? 2 : 1;
#endif
STRDUP(vpninfo->csd_wrapper, wrapper);

return 0;
Expand Down
6 changes: 3 additions & 3 deletions openconnect-internal.h
Expand Up @@ -399,10 +399,7 @@ struct openconnect_info {
int nopasswd;
int xmlpost;
char *dtls_ciphers;
uid_t uid_csd;
gid_t gid_csd;
char *csd_wrapper;
int uid_csd_given;
int no_http_keepalive;
int dump_http_traffic;

Expand Down Expand Up @@ -538,6 +535,9 @@ struct openconnect_info {
char *dtls_cipher;
char *vpnc_script;
#ifndef _WIN32
int uid_csd_given;
uid_t uid_csd;
gid_t gid_csd;
uid_t uid;
gid_t gid;
#endif
Expand Down

0 comments on commit ba84b55

Please sign in to comment.