]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows port: allow build of squid_radius_auth on Windows
authorGuido Serassio <serassio@squid-cache.org>
Thu, 1 May 2008 17:23:50 +0000 (19:23 +0200)
committerGuido Serassio <serassio@squid-cache.org>
Thu, 1 May 2008 17:23:50 +0000 (19:23 +0200)
Experimental - correct helper functionality still NOT TESTED

helpers/basic_auth/squid_radius_auth/squid_rad_auth.c [changed mode: 0644->0755]
helpers/basic_auth/squid_radius_auth/util.h [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 960cf65..d10d529
@@ -65,6 +65,9 @@
 #if HAVE_FCNTL_H
 #include       <fcntl.h>
 #endif
+#ifdef _SQUID_WIN32_
+#include <io.h>
+#endif
 
 #if HAVE_CTYPE_H
 #include       <ctype.h>
 #if HAVE_STRING_H
 #include       <string.h>
 #endif
+#if HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#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.
      */
old mode 100644 (file)
new mode 100755 (executable)
index c95d74d..fd9d304
@@ -1,2 +1,4 @@
+#include "../../../include/util.h"
+
 /* util.c */
 u_int32_t              get_ipaddr (char *);