Skip to content

Commit

Permalink
Patch libsnark to build with my compiler. Upstream PR zcash#35.
Browse files Browse the repository at this point in the history
  • Loading branch information
defuse committed May 18, 2016
1 parent 6dc53bd commit e334392
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
5 changes: 3 additions & 2 deletions depends/packages/libsnark.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ $(package)_sha256_hash=b5ec84a836d0d305407d5f39c8176bae2bb448abe802a8d11ba0f88f1
$(package)_git_commit=69f312f149cc4bd8def8e2fed26a7941ff41251d

$(package)_dependencies=libgmp
$(package)_patches=1_fix_Wl_flag.patch
$(package)_patches=1_fix_Wl_flag.patch 2_include_iota_header.patch

define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/1_fix_Wl_flag.patch
patch -p1 < $($(package)_patch_dir)/1_fix_Wl_flag.patch && \
patch -p1 < $($(package)_patch_dir)/2_include_iota_header.patch
endef

define $(package)_build_cmds
Expand Down
31 changes: 31 additions & 0 deletions depends/patches/libsnark/2_include_iota_header.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
commit c437365ec98ec77754287594d2d3748901d0d176
Author: Taylor Hornby <[email protected]>
Date: Wed May 18 10:49:58 2016 -0600

Include header required for std::iota.

diff --git a/src/common/data_structures/integer_permutation.cpp b/src/common/data_structures/integer_permutation.cpp
index f9f9327..378ea7e 100644
--- a/src/common/data_structures/integer_permutation.cpp
+++ b/src/common/data_structures/integer_permutation.cpp
@@ -15,6 +15,7 @@

#include <algorithm>
#include <cassert>
+#include <numeric>
#include <unordered_set>

namespace libsnark {
diff --git a/src/common/data_structures/sparse_vector.tcc b/src/common/data_structures/sparse_vector.tcc
index 26429a5..cfc5d75 100644
--- a/src/common/data_structures/sparse_vector.tcc
+++ b/src/common/data_structures/sparse_vector.tcc
@@ -16,6 +16,8 @@

#include "algebra/scalar_multiplication/multiexp.hpp"

+#include <numeric>
+
namespace libsnark {

template<typename T>

0 comments on commit e334392

Please sign in to comment.