From 10392fba3dafaf32a86d7072be5297106266ff6b Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Tue, 13 Sep 2011 15:22:38 +1000 Subject: [PATCH] more build fixes for Windows --- moonshot/mech_eap/gssapiP_eap.h | 7 +++++++ moonshot/mech_eap/util_cred.c | 11 ++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/moonshot/mech_eap/gssapiP_eap.h b/moonshot/mech_eap/gssapiP_eap.h index b141032..50884ec 100644 --- a/moonshot/mech_eap/gssapiP_eap.h +++ b/moonshot/mech_eap/gssapiP_eap.h @@ -56,6 +56,13 @@ #include #endif +#ifdef WIN32 +#ifndef MAXHOSTNAMELEN +# include +# define MAXHOSTNAMELEN NI_MAXHOST +#endif +#endif + /* GSS headers */ #include #include diff --git a/moonshot/mech_eap/util_cred.c b/moonshot/mech_eap/util_cred.c index 0cb8a76..0479c59 100644 --- a/moonshot/mech_eap/util_cred.c +++ b/moonshot/mech_eap/util_cred.c @@ -36,7 +36,9 @@ #include "gssapiP_eap.h" -#ifndef WIN32 +#ifdef WIN32 +#include +#else #include #endif @@ -129,10 +131,13 @@ readStaticIdentityFile(OM_uint32 *minor, { OM_uint32 major, tmpMinor; FILE *fp = NULL; - char pwbuf[BUFSIZ], buf[BUFSIZ]; + char buf[BUFSIZ]; char *ccacheName; - struct passwd *pw = NULL, pwd; int i = 0; +#ifndef WIN32 + struct passwd *pw = NULL, pwd; + char pwbuf[BUFSIZ]; +#endif defaultIdentity->length = 0; defaultIdentity->value = NULL; -- 2.1.4