Update libmemcached version number due to change of struct size
[m6w6/libmemcached] / clients / utilities.c
index 6353ff6b97e8b0894195c4b44353bb451613a044..4d36cd20b135543aaaf854f66d62a3a30f313a1b 100644 (file)
@@ -8,8 +8,8 @@
  * Summary:
  *
  */
+#include "config.h"
 
-#include "libmemcached/common.h"
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
@@ -215,3 +215,16 @@ void shutdown_sasl(void)
     sasl_done();
 #endif
 }
+
+void initialize_sockets(void)
+{
+  /* Define the function for all platforms to avoid #ifdefs in each program */
+#ifdef WIN32
+  WSADATA wsaData;
+  if (WSAStartup(MAKEWORD(2,0), &wsaData) != 0)
+  {
+    fprintf(stderr, "Socket Initialization Error. Program aborted\n");
+    exit(EXIT_FAILURE);
+  }
+#endif
+}