Some initial Windows portability fixes in include files
[moonshot.git] / moonshot / mech_eap / gssapiP_eap.h
index d1d6bce..372737a 100644 (file)
 #include <assert.h>
 #include <string.h>
 #include <errno.h>
+#if !defined(WIN32)
 #include <unistd.h>
+#endif
 #include <stdlib.h>
 #include <stdarg.h>
 #include <time.h>
+#if !defined(WIN32)
 #include <sys/param.h>
+#endif
 
 /* GSS headers */
 #include <gssapi/gssapi.h>
@@ -58,6 +62,10 @@ typedef struct gss_any *gss_any_t;
 #endif
 #include "gssapi_eap.h"
 
+#ifndef HAVE_GSS_INQUIRE_ATTRS_FOR_MECH
+typedef const gss_OID_desc *gss_const_OID;
+#endif
+
 /* Kerberos headers */
 #include <krb5.h>
 
@@ -69,6 +77,7 @@ typedef struct gss_any *gss_any_t;
 #include <eap_common/eap_common.h>
 #include <wpabuf.h>
 
+#ifdef GSSEAP_ENABLE_ACCEPTOR
 /* FreeRADIUS headers */
 #ifdef __cplusplus
 extern "C" {
@@ -82,6 +91,7 @@ extern "C" {
 #undef operator
 }
 #endif
+#endif /*GSSEAP_ENABLE_ACCEPTOR*/
 
 #include "gsseap_err.h"
 #include "radsec_err.h"
@@ -165,6 +175,7 @@ struct gss_eap_initiator_ctx {
     struct wpabuf reqData;
 };
 
+#ifdef GSSEAP_ENABLE_ACCEPTOR
 struct gss_eap_acceptor_ctx {
     struct rs_context *radContext;
     struct rs_connection *radConn;
@@ -172,6 +183,7 @@ struct gss_eap_acceptor_ctx {
     gss_buffer_desc state;
     VALUE_PAIR *vps;
 };
+#endif
 
 #ifdef HAVE_HEIMDAL_VERSION
 struct gss_ctx_id_t_desc_struct
@@ -196,8 +208,10 @@ struct gss_ctx_id_struct
     union {
         struct gss_eap_initiator_ctx initiator;
         #define initiatorCtx         ctxU.initiator
+#ifdef GSSEAP_ENABLE_ACCEPTOR
         struct gss_eap_acceptor_ctx  acceptor;
         #define acceptorCtx          ctxU.acceptor
+#endif
 #ifdef GSSEAP_ENABLE_REAUTH
         gss_ctx_id_t                 reauth;
         #define reauthCtx            ctxU.reauth