From 757bcd6b364b6ce03a7633190d2010a11f316962 Mon Sep 17 00:00:00 2001 From: Guido Serassio Date: Thu, 1 May 2008 19:23:50 +0200 Subject: [PATCH] Windows port: allow build of squid_radius_auth on Windows Experimental - correct helper functionality still NOT TESTED --- .../basic_auth/squid_radius_auth/squid_rad_auth.c | 15 +++++++++++++++ helpers/basic_auth/squid_radius_auth/util.h | 2 ++ 2 files changed, 17 insertions(+) mode change 100644 => 100755 helpers/basic_auth/squid_radius_auth/squid_rad_auth.c mode change 100644 => 100755 helpers/basic_auth/squid_radius_auth/util.h diff --git a/helpers/basic_auth/squid_radius_auth/squid_rad_auth.c b/helpers/basic_auth/squid_radius_auth/squid_rad_auth.c old mode 100644 new mode 100755 index 960cf65ed3..d10d529d28 --- a/helpers/basic_auth/squid_radius_auth/squid_rad_auth.c +++ b/helpers/basic_auth/squid_radius_auth/squid_rad_auth.c @@ -65,6 +65,9 @@ #if HAVE_FCNTL_H #include #endif +#ifdef _SQUID_WIN32_ +#include +#endif #if HAVE_CTYPE_H #include @@ -90,6 +93,12 @@ #if HAVE_STRING_H #include #endif +#if HAVE_GETOPT_H +#include +#endif +#if HAVE_ERRNO_H +#include +#endif #include "md5.h" #include "radius.h" @@ -492,6 +501,12 @@ main(int argc, char **argv) exit(1); } +#ifdef _SQUID_MSWIN_ + { + WSADATA wsaData; + WSAStartup(2, &wsaData); + } +#endif /* * Open a connection to the server. */ diff --git a/helpers/basic_auth/squid_radius_auth/util.h b/helpers/basic_auth/squid_radius_auth/util.h old mode 100644 new mode 100755 index c95d74d5ae..fd9d3040ef --- a/helpers/basic_auth/squid_radius_auth/util.h +++ b/helpers/basic_auth/squid_radius_auth/util.h @@ -1,2 +1,4 @@ +#include "../../../include/util.h" + /* util.c */ u_int32_t get_ipaddr (char *); -- 2.47.3