2009-10-08 Marcus Brinkmann <marcus@g10code.com>
authorMarcus Brinkmann <mb@g10code.com>
Sat, 10 Oct 2009 23:19:49 +0000 (23:19 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Sat, 10 Oct 2009 23:19:49 +0000 (23:19 +0000)
        * Makefile.am (EXTRA_DIST): Add
        patches/scute-1.3.0/01-wsastartup.patch.

ChangeLog
Makefile.am
patches/scute-1.3.0/01-wsastartup.patch [new file with mode: 0755]

index 28a0710..fae110f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-08  Marcus Brinkmann  <marcus@g10code.com>
+
+       * Makefile.am (EXTRA_DIST): Add
+       patches/scute-1.3.0/01-wsastartup.patch.
+
 2009-10-05  Marcus Brinkmann  <marcus@g10code.com>
 
        * src/inst-sections.nsi (calc_defaults_man_advanced_en_done):
index f8e9a58..aa84a31 100644 (file)
@@ -59,7 +59,8 @@ EXTRA_DIST = autogen.sh README.SVN ONEWS \
        patches/gpgol-0.9.91/01-gpgme.patch \
         patches/gpa-0.9.0/01-title-prop.patch \
        patches/libetpan-0.57/01-gnutls_compat.patch \
-        patches/scute-1.2.0/01-bugfixes.patch
+        patches/scute-1.2.0/01-bugfixes.patch \
+        patches/scute-1.3.0/01-wsastartup.patch
 
 copy-news:
        cp NEWS doc/website/NEWS.last
diff --git a/patches/scute-1.3.0/01-wsastartup.patch b/patches/scute-1.3.0/01-wsastartup.patch
new file mode 100755 (executable)
index 0000000..0aa10d3
--- /dev/null
@@ -0,0 +1,59 @@
+#! /bin/sh
+patch -p0 -f $* < $0
+exit $?
+
+
+Index: src/p11-finalize.c
+===================================================================
+--- src/p11-finalize.c (revision 98)
++++ src/p11-finalize.c (working copy)
+@@ -30,6 +30,10 @@
+ #if HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#ifdef HAVE_W32_SYSTEM
++#define __USE_W32_SOCKETS 1
++#include <windows.h>
++#endif
+ #include "cryptoki.h"
+@@ -50,5 +54,9 @@
+   scute_agent_finalize ();
+   scute_locking_finalize ();
++#ifdef HAVE_W32_SYSTEM
++  WSACleanup ();
++#endif
++
+   return CKR_OK;
+ }
+Index: src/p11-initialize.c
+===================================================================
+--- src/p11-initialize.c       (revision 98)
++++ src/p11-initialize.c       (working copy)
+@@ -33,6 +33,11 @@
+ #include <stdbool.h>
++#ifdef HAVE_W32_SYSTEM
++#define __USE_W32_SOCKETS 1
++#include <windows.h>
++#endif
++
+ #include <assuan.h>
+ #include <gpg-error.h>
+@@ -49,6 +54,11 @@
+ CK_DEFINE_FUNCTION(CK_RV, C_Initialize) (CK_VOID_PTR pInitArgs)
+ {
+   CK_RV err;
++  WSADATA wsadat;
++      
++#ifdef HAVE_W32_SYSTEM
++  WSAStartup (0x202, &wsadat);
++#endif
+   /* This is one of the few functions which do not need to take the
+      global lock.  */
+