summaryrefslogtreecommitdiffstats
path: root/plugins/apps
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2016-02-21 19:57:12 (GMT)
committerBoris Nagaev <bnagaev@gmail.com>2016-02-28 10:26:27 (GMT)
commit5081fb9ab0ffd30759cdd10014b61cbd5f237238 (patch)
tree87252022c12a4cd06b7e7b0920fdc61227716d66 /plugins/apps
parent5b7965193f4a11e634196a7bf564936a5eba0b4e (diff)
downloadmxe-5081fb9ab0ffd30759cdd10014b61cbd5f237238.zip
mxe-5081fb9ab0ffd30759cdd10014b61cbd5f237238.tar.gz
mxe-5081fb9ab0ffd30759cdd10014b61cbd5f237238.tar.bz2
tor: fix linking errors if mman-win32 is installed
Diffstat (limited to 'plugins/apps')
-rw-r--r--plugins/apps/tor-1-fixes.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/plugins/apps/tor-1-fixes.patch b/plugins/apps/tor-1-fixes.patch
new file mode 100644
index 0000000..9d9b415
--- /dev/null
+++ b/plugins/apps/tor-1-fixes.patch
@@ -0,0 +1,50 @@
+This file is part of MXE.
+See index.html for further information.
+
+Contains ad hoc patches for cross building.
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Boris Nagaev <bnagaev@gmail.com>
+Date: Sun, 21 Feb 2016 22:51:30 +0300
+Subject: [PATCH] do not use mman-win32
+
+tor can be compiled without mman-win32, because it has own
+implementation of mmap using Windows API. But if mman-win32
+is installed, tor tries to use it resulting in linking errors.
+(In MXE mman-win32 installs DLLs even for static targets!)
+
+diff --git a/src/common/compat.c b/src/common/compat.c
+index 1111111..2222222 100644
+--- a/src/common/compat.c
++++ b/src/common/compat.c
+@@ -101,7 +101,7 @@
+ #ifdef HAVE_SYS_UTIME_H
+ #include <sys/utime.h>
+ #endif
+-#ifdef HAVE_SYS_MMAN_H
++#if 0
+ #include <sys/mman.h>
+ #endif
+ #ifdef HAVE_SYS_SYSLIMITS_H
+@@ -191,7 +191,7 @@ tor_rename(const char *path_old, const char *path_new)
+ sandbox_intern_string(path_new));
+ }
+
+-#if defined(HAVE_SYS_MMAN_H) || defined(RUNNING_DOXYGEN)
++#if 0
+ /** Try to create a memory mapping for <b>filename</b> and return it. On
+ * failure, return NULL. Sets errno properly, using ERANGE to mean
+ * "empty file". */
+diff --git a/src/common/compat.h b/src/common/compat.h
+index 1111111..2222222 100644
+--- a/src/common/compat.h
++++ b/src/common/compat.h
+@@ -285,7 +285,7 @@ typedef struct tor_mmap_t {
+ size_t size; /**< Size of the file. */
+
+ /* None of the fields below should be accessed from outside compat.c */
+-#ifdef HAVE_SYS_MMAN_H
++#if 0
+ size_t mapping_size; /**< Size of the actual mapping. (This is this file
+ * size, rounded up to the nearest page.) */
+ #elif defined _WIN32