oxen-core/utils/build_scripts/libzmq-pr3613-fix-funcptr-call.patch
Jason Rhinelander 70b9fed4fd Static builds: make usable binaries from cmake
This adds a static dependency script for libraries like boost, unbound,
etc. to cmake, invokable with:

    cmake .. -DBUILD_STATIC_DEPS=ON

which downloads and builds static versions of all our required
dependencies (boost, unbound, openssl, ncurses, etc.).  It also implies
-DSTATIC=ON to build other vendored deps (like miniupnpc, lokimq) as
static as well.

Unlike the contrib/depends system, this is easier to maintain (one
script using nicer cmake with functions instead of raw Makefile
spaghetti code), and isn't concerned with reproducible builds -- this
doesn't rebuild the compiler, for instance.  It also works with the
existing build system so that it is simply another way to invoke the
cmake build scripts but doesn't require any external tooling.

This works on Linux, Mac, and Windows.

Some random comments on this commit (for preserving history):

- Don't use target_link_libraries on imported targets.  Newer cmake is
fine with it, but Bionic's cmake doesn't like it but seems okay with
setting the properties directly.

- This rebuilds libzmq and libsodium, even though there is some
provision already within loki-core to do so: however, the existing
embedded libzmq fails with the static deps because it uses libzmq's
cmake build script, which relies on pkg-config to find libsodium which
ends up finding the system one (or not finding any), rather than the one
we build with DownloadLibSodium.  Since both libsodium and libzmq are
faily simple builds it seemed easiest to just add them to the cmake
static build rather than trying to shoehorn the current code into the
static build script.

- Half of the protobuf build system ignores CC/CXX just because Google,
and there's no documentation anywhere except for a random closed bug
report about needing to set these other variables (CC_FOR_BUILD,
CXX_FOR_BUILD) instead, but you need to.  Thanks Google.

- The boost build is set to output very little because even the minimum
-d1 output level spams ~15k lines of output just for the headers it
installs.
2020-06-15 12:49:33 -03:00

44 lines
1.4 KiB
Diff

diff --git a/RELICENSE/tomzbench.md b/RELICENSE/tomzbench.md
new file mode 100644
index 000000000..1cbcc4fdb
--- /dev/null
+++ b/RELICENSE/tomzbench.md
@@ -0,0 +1,14 @@
+# Permission to Relicense under MPLv2
+
+This is a statement by Thomas Chiantia
+that grants permission to relicense its copyrights in the libzmq C++
+library (ZeroMQ) under the Mozilla Public License v2 (MPLv2).
+
+A portion of the commits made by the Github handle "tomzbench", with
+commit author "Thomas<Thomas@Altronix.com>", are copyright of
+Thomas Chiantia.
+This document hereby grants the libzmq project team to relicense libzmq,
+including all past, present and future contributions of the author listed above.
+
+Thomas Chiantia
+2019/08/10
diff --git a/src/thread.cpp b/src/thread.cpp
index 2cad2adaa..6f07e9cee 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -117,11 +117,14 @@ struct thread_info_t
#pragma pack(pop)
}
-typedef struct _MY_EXCEPTION_REGISTRATION_RECORD
+struct MY_EXCEPTION_REGISTRATION_RECORD
{
- struct _MY_EXCEPTION_REGISTRATION_RECORD *Next;
- void *Handler;
-} MY_EXCEPTION_REGISTRATION_RECORD;
+ typedef EXCEPTION_DISPOSITION (NTAPI *HandlerFunctionType) (
+ EXCEPTION_RECORD *, void *, CONTEXT *, void *);
+
+ MY_EXCEPTION_REGISTRATION_RECORD *Next;
+ HandlerFunctionType Handler;
+};
static EXCEPTION_DISPOSITION NTAPI continue_execution (EXCEPTION_RECORD *rec,
void *frame,