Skip to content

Commit

Permalink
Merge pull request #2090 from p51d78th/master
Browse files Browse the repository at this point in the history
Fix macOS errors while building after cryptoRF solvers was added.
  • Loading branch information
iceman1001 authored Aug 24, 2023
2 parents db7a8e1 + 760bfbb commit e99fcee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions tools/cryptorf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ MYLDLIBS = -lpthread
BINS = cm sm sma sma_multi
INSTALLTOOLS = $(BINS)

platform = $(shell uname)

ifeq ($(platform),Darwin)
CXXFLAGS = -std=c++14
endif

include ../../Makefile.host

# checking platform can be done only after Makefile.host
Expand Down
4 changes: 1 addition & 3 deletions tools/cryptorf/sma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,13 +671,12 @@ static inline void search_gc_candidates_left(const uint64_t lstate_before_gc, co

void combine_valid_left_right_states(vector<cs_t> *plcstates, vector<cs_t> *prcstates, vector<uint64_t> *pgc_candidates) {
vector<cs_t>::iterator itl, itr;
size_t pos, count;
size_t pos;
uint64_t gc;
bool valid;

// Clean up the candidate list
pgc_candidates->clear();
count = 0;
for (itl = plcstates->begin(); itl != plcstates->end(); ++itl) {
for (itr = prcstates->begin(); itr != prcstates->end(); ++itr) {
valid = true;
Expand All @@ -700,7 +699,6 @@ void combine_valid_left_right_states(vector<cs_t> *plcstates, vector<cs_t> *prcs
// printf("%09llx - ",itl->l);
// printf("%07llx\n",itr->r);
}
count++;
}
}
printf("Found a total of " _YELLOW_("%llu")" combinations, ", ((unsigned long long)plcstates->size()) * prcstates->size());
Expand Down

0 comments on commit e99fcee

Please sign in to comment.