summaryrefslogtreecommitdiff
path: root/openssl.c.patch
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--openssl.c.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/openssl.c.patch b/openssl.c.patch
new file mode 100644
index 0000000..efc28f6
--- /dev/null
+++ b/openssl.c.patch
@@ -0,0 +1,46 @@
1diff --git a/src/openssl.c b/src/openssl.c
2index fd7d28e..5e89f2a 100644
3--- a/src/openssl.c
4+++ b/src/openssl.c
5@@ -40,13 +40,21 @@
6 #include <sys/types.h> /* ssize_t pid_t */
7 #include <sys/time.h> /* struct timeval gettimeofday(2) */
8 #include <sys/stat.h> /* struct stat stat(2) */
9+#ifdef _WIN32_WINNT
10+#include <winsock2.h> /* struct in_addr */
11+#include <windows.h>
12+#include <ws2def.h> /* AF_INET AF_INET6 */
13+#include <in6addr.h> /* struct in6_addr */
14+#include <ws2tcpip.h> /* inet_pton */
15+#else
16 #include <sys/socket.h> /* AF_INET AF_INET6 */
17 #include <sys/resource.h> /* RUSAGE_SELF struct rusage getrusage(2) */
18 #include <sys/utsname.h> /* struct utsname uname(3) */
19-#include <fcntl.h> /* O_RDONLY O_CLOEXEC open(2) */
20-#include <unistd.h> /* close(2) getpid(2) */
21 #include <netinet/in.h> /* struct in_addr struct in6_addr */
22 #include <arpa/inet.h> /* inet_pton(3) */
23+#endif
24+#include <fcntl.h> /* O_RDONLY O_CLOEXEC open(2) */
25+#include <unistd.h> /* close(2) getpid(2) */
26 #include <pthread.h> /* pthread_mutex_init(3) pthread_mutex_lock(3) pthread_mutex_unlock(3) */
27 #include <dlfcn.h> /* dladdr(3) dlopen(3) */
28
29@@ -10082,8 +10090,6 @@ error:;
30 struct {
31 struct timeval tv;
32 pid_t pid;
33- struct rusage ru;
34- struct utsname un;
35 uintptr_t aslr;
36 #if defined __APPLE__
37 uint64_t mt;
38@@ -10094,8 +10100,6 @@ error:;
39
40 gettimeofday(&junk.tv, NULL);
41 junk.pid = getpid();
42- getrusage(RUSAGE_SELF, &junk.ru);
43- uname(&junk.un);
44 junk.aslr = (uintptr_t)&strcpy ^ (uintptr_t)&randL_stir;
45 #if defined __APPLE__
46 junk.mt = mach_absolute_time();