1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
This file is part of mingw-cross-env.
See doc/index.html for further information.
Contains ad hoc patches for cross building.
From 3d4e0e4f8a2dda773cd264b113ac8a61e913a9d5 Mon Sep 17 00:00:00 2001
From: mingw-cross-env
Date: Wed, 17 Aug 2011 21:25:23 +0200
Subject: [PATCH 1/3] no pwd.h for windows
diff --git a/p11-kit/conf.c b/p11-kit/conf.c
index 55e0268..d9aaf69 100644
--- a/p11-kit/conf.c
+++ b/p11-kit/conf.c
@@ -50,7 +50,9 @@
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
+#ifndef _WIN32
#include <pwd.h>
+#endif
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
@@ -338,6 +340,7 @@ expand_user_path (const char *path)
env = getenv ("HOME");
if (env && env[0]) {
return strconcat (env, path + 1, NULL);
+#ifndef _WIN32
} else {
pwd = getpwuid (getuid ());
if (!pwd) {
@@ -348,6 +351,7 @@ expand_user_path (const char *path)
return NULL;
}
return strconcat (pwd->pw_dir, path + 1, NULL);
+#endif
}
}
--
1.7.6
From db04a7c8720f46f1e30a97033e1368245818ff8c Mon Sep 17 00:00:00 2001
From: mingw-cross-env
Date: Wed, 17 Aug 2011 21:43:11 +0200
Subject: [PATCH 2/3] no pthread_atfork for windows
diff --git a/p11-kit/modules.c b/p11-kit/modules.c
index 97fb58f..0d22aa5 100644
--- a/p11-kit/modules.c
+++ b/p11-kit/modules.c
@@ -522,7 +522,9 @@ init_globals_unlocked (void)
if (once)
return CKR_OK;
+#ifndef _WIN32
pthread_atfork (NULL, NULL, reinitialize_after_fork);
+#endif
once = 1;
return CKR_OK;
--
1.7.6
From 62cee086ce38db2a2570ae63e6ab4a2fa593aee2 Mon Sep 17 00:00:00 2001
From: mingw-cross-env
Date: Wed, 17 Aug 2011 21:41:45 +0200
Subject: [PATCH 3/3] add Libs.private for static linking
diff --git a/p11-kit/p11-kit-1.pc.in b/p11-kit/p11-kit-1.pc.in
index 9ef67a3..1fcf860 100644
--- a/p11-kit/p11-kit-1.pc.in
+++ b/p11-kit/p11-kit-1.pc.in
@@ -15,4 +15,5 @@ Name: p11-kit
Description: Library and proxy module for properly loading and sharing PKCS#11 modules.
Version: @VERSION@
Libs: -L${libdir} -lp11-kit
+Libs.private: -ldl -lintl -liconv -lpthread
Cflags: -I${includedir}/p11-kit-1
--
1.7.6
|